在 com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated 上找不到 属性 'packageApplication'

Could not find property 'packageApplication' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated

将 android 构建工具 gradle 插件从 0.14.0 升级到 1.0.0 后,我无法再 运行 我的调试构建在我的 USB 连接设备上,使用命令 'gradle runDebug'.

但是,所有其他 gradle 命令都有效(测试、清理构建、构建)。

这是堆栈:

Execution failed for task ':myAndroidApp:installDeviceDebug'.
> Could not find property 'packageApplication' on
com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@4001495a.

org.gradle.api.tasks.TaskExecutionException: Execution failed for task
':myAndroidApp:installDeviceDebug'.

Caused by: groovy.lang.MissingPropertyException: Could not find property 'packageApplication' on
com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@4001495a.
at
org.gradle.api.internal.AbstractDynamicObject.propertyMissingException(AbstractDynamicObject.java:43)
at org.gradle.api.internal.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:35)
at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:94)
at com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated.getProperty(Unknown Source)
at com.novoda.gradle.command.VariantConfigurator$_configure_closure2.doCall(VariantConfigurator.groovy:29)
at com.novoda.gradle.command.AdbCommand.toString(AdbCommand.groovy:19)
at com.novoda.gradle.command.AdbTask.runCommand(AdbTask.groovy:35)
at com.novoda.gradle.command.Install.exec(Install.groovy:9)

当前工具

Gradle 构建设置

我通过将 'com.novoda:gradle-android-command-plugin:1.2.1' 升级到 'com.novoda:gradle-android-command-plugin:1.3.0' 来解决这个问题。