首先声明,我所用的as版本是3.1.3。踩坑了好几处。最终修改以下地方,亲测编译运行通过,因错误已解决,我这里就不截图报错信息了。至于为什么要这么修改,各位大神你懂的。
1.chatapp模块下build.gradle 添加
compileOnly ‘com.jakewharton:butterknife:7.0.1’
annotationProcessor ‘com.jakewharton:butterknife:7.0.1’
2.项目根目录下添加:
allprojects {
repositories {
…
google()
…
}
}
3.资源文件动画name去掉“@”标志符
所在路径为chatapp/src/main/res/values/styles
原来
@anim/dialog_enter
//进入时的动画
@anim/dialog_exit
//退出时的动画
修改为
@anim/dialog_enter
//进入时的动画
@anim/dialog_exit
//退出时的动画
4.修改构建编译版本号
android {
compileSdkVersion 26
buildToolsVersion “27.0.3”
defaultConfig {
...
minSdkVersion 18
targetSdkVersion 26
…
}
5.注释掉签名
// signingConfigs {
// release {
// storeFile file(“release.keystore”)
// storePassword “jpush-release”
// keyAlias “release.keystore”
// keyPassword “jpush-release”
// }
// debug {
// storeFile file(“debug.keystore”)
// storePassword “jpush-debug”
// keyAlias “debug.keystore”
// keyPassword “jpush-debug”
// }
// }
6.gradle配置文件中所有compile->complementation