Android Studio 3.0更新项目报错处理方案

今天更新Android Studio3.0后编译项目出现一堆问题,现经过大半天的Google总结一下问题处理方案

1.Error:All flavors must now belong to a named flavor dimension. Learn more at ……
出现此问题系用到多渠道打包引起的,在Android Studio3.0之后对gradle配置作出了更细致的配置,需要在app的build.gradle中指定flavorDimensions模式,在多渠道中使用dimension模式即可,如下设置:
这里写图片描述

2.Could not resolve project

在项目中难免会引入项目中其他model,按照之前的应用方式compile project('....')不能在使用,要按照最新的implementation project('...'),如下方可解决(configuration:'模式'----模式使用问题1中设置的模式即可):

这里写图片描述

3.error: resource android:attr/fontWeight not found

此类问题比较简单,将buildtool版本号跟系统依赖库的版本号更新到最新版本即可。(若有疑问发送邮件至[email protected]

猜你喜欢

转载自blog.csdn.net/gang521weijie/article/details/78393309