我刚刚将Android Studio从2.1升级到2.2,我的项目从正常工作变为错误:
Gradle sync失败:没有这样的属性:packageApplicationTask for class:com.android.build.gradle.internal.variant.ApkVariantOutputData
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://repos.zeroturnaround.com/nexus/content/repositories/zt-public-releases'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
// This does not break the build when Android Studio is missing the JRebel for Android plugin.
classpath 'com.zeroturnaround.jrebel.android:jr-android-gradle:1.0.+'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
allprojects {
repositories {
jcenter()
}
}
#Mon Aug 22 11:09:46 PDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
如果我可以添加任何其他可能有助于解决此问题的文件,我很乐意这样做,但我不知道此时可能有用的内容。感谢任何提示
答案 0 :(得分:4)
摆脱您的JRebel导入。这为我修好了。事实上,他们必须在那里传达一条信息,说它不会破坏它本身就是粗略的。
答案 1 :(得分:1)
我刚刚删除了以下一行:
apply plugin: 'com.zeroturnaround.jrebel.android'
它就像一个魅力