Android Studio 3.0升级小结

今天把AS的版本升级到了3.0,升级过程小结一下。
1、3.0版本需要升级编译工具的版本: buildToolsVersion ‘26.0.2’
2、和apt冲突:
Error:A problem occurred configuring project ‘:app’.

android-apt plugin is incompatible with the Android Gradle plugin. Please use ‘annotationProcessor’ configuration instead.

去掉app的build.gradle中的apply plugin: ‘android-apt’
把apt相关的地方换乘annotationProcessor
如 : apt ‘com.jakewharton:butterknife-compiler:8.8.1’ –> annotationProcessor ‘com.jakewharton:butterknife-compiler:8.8.1’

3、输出APK名称的规则的变更
applicationVariants.all { variant ->
variant.outputs.all {
//outputFileName = “xxx_{defaultConfig.versionCode}_{defaultConfig.versionName}_${variant.productFlavors[0].name}.apk”
}
}

4、版本号相关的冲突:
Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html
在defaultConfig 标签中加入:
versionCode=200
versionName=2.0
flavorDimensions “versionCode”

5、和黄油刀的冲突
把黄油刀的版本降下来,原来是8.8.1
classpath ‘com.jakewharton:butterknife-gradle-plugin:8.4.0’

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值