在我的项目中,我想运行自定义任务“MyTask”以在卸载发生之前运行。相同的代码是uninstallDebug.dependsOn "MyTask"
当我运行它时,它失败并显示错误Could not find property 'uninstallDebug' on project
相反,我在Gradle窗口中看到了具有该名称的gradle任务。
可能出什么问题了?
最佳答案
project.afterEvaluate { p ->
p.tasks.uninstallDebug.doFirst {
println 'before uninstall'
}
}
关于android - 在项目上找不到属性 'uninstallDebug',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35596011/