每次运行测试之前我都需要它,使用命令运行任务 adb
adb shell pm reset-permissions
我尝试在我的gradle文件中执行此操作,这是令人满意的,但它是如何运行的?
buildscript {
...
}
android {
...
}
task resetPermission(type: Exec) {
commandLine 'adb', 'shell', 'pm', 'reset-permissions'
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2985 次 |
| 最近记录: |