1.
//apply plugin: 'com.neenbedankt.android-apt' 删除
2.
apt 'com.jakewharton:butterknife-compiler:8.2.1'
更换为
annotationProcessor 'com.jakewharton:butterknife-compiler:8.2.1'
3.
EventBus
compile 'org.greenrobot:eventbus:3.0.0'
annotationProcessor 'org.greenrobot:eventbus-annotation-processor:3.0.1'
4.
//apt {
// arguments {
// eventBusIndex "com.kp5000.Main.MyEventBusIndex"
// }
//}
更换为:
defaultConfig
jackOptions {
enabled true
}
javaCompileOptions {
annotationProcessorOptions {
arguments = [ eventBusIndex : 'org.greenrobot.eventbusperf.MyEventBusIndex' ]
}
}
}
5.
applicationVariants.all { variant ->
variant.outputs.all { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def fileName = "Kaopu5000_v${defaultConfig.versionName}_${variant.productFlavors[0].name}.apk"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
更换为
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "Kaopu5000_v${defaultConfig.versionName}_${variant.productFlavors[0].name}.apk"
}
}
6.
//增加选项
defaultConfig {
flavorDimensions "versionCode"
}
7.
//增加选项 gradle.properties 文件
android.enableAapt2=false
8.
App 和module中的 release debug 必须一致 没有{} 内可以为空
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
}
}
9.
@android:windowEnterAnimation
@android:windowExitAnimation
@去掉
<style name="mypopwindow_anim_style">
<item name="android:windowEnterAnimation">@anim/alpha_and_scale_begin</item> <!—指定显示的动画xml
-->
<item name="android:windowExitAnimation">@anim/alpha_and_scale_end</item> <!—指定消失的动画xml
-->
</style>