androidStudio升级遇到的问题

下载更新

File | Settings | Appearance & Behavior | System Settings | Updates,然后点击CheckNow,会显示最新版本的AndroidStudio。这里注意,就算是download也可以放心的去下载,因为到时候安装的时候会自动删除你之前的版本,然后覆盖。

gradle更新问题

1.compile 替换为 implementation
apt 替换为 annotationProcessor
testCompile 替换为 androidTestImplementation
releaseCompile 替换为 releaseImplementation

2.需要在build.gradle中添加如下代码。以应对cannot resolve symbol的问题。StackOverflow地址

allprojects {
    repositories {
        jcenter()
        google()
    }
}

3.问题:references to other resources are not supported by build-time PNG generation
解决方法:
1).把minSdkVersion改为21
2).在build.gradle中添加如下代码

defaultConfig{
   vectorDrawables.useSupportLibrary = true
}
发布了55 篇原创文章 · 获赞 28 · 访问量 9263

猜你喜欢

转载自blog.csdn.net/weixin_41796401/article/details/90904135