这是错误:
Error:No such property: packageApplicationTask for class:
com.android.build.gradle.internal.variant.ApkVariantOutputData
这是我的插件列表:
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'hugo'
apply plugin: 'com.trello.victor'
apply plugin: 'com.github.triplet.play'
apply plugin: 'com.mutualmobile.gradle.plugins.dexinfo'
apply plugin: 'org.moallemi.advanced-build-version'
apply plugin: 'com.mindera.gradle.slack'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.github.alexfu.androidautoversion'
apply plugin: 'net.jokubasdargis.build-timer'
apply plugin: 'hu.supercluster.paperwork'
apply plugin: "build-time-tracker"
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: "com.lib.logthisannotations"
apply plugin: 'io.fabric'
apply plugin: 'com.noveogroup.android.check'
apply plugin: 'realm-android'
答案 0 :(得分:14)
我的问题是Jrebel和Android Studio 2.2。 我已经删除了我的gradle文件中对jrebel的任何引用,现在没问题。
答案 1 :(得分:0)
只需按用户answer
尝试此thorbearandroid {
applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def fileName = outputFile.name.replace('.apk', "-${versionName}.apk")
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
}