关于android studio3.0版本后引入资源问题error: failed linking file resources

最近更新阿里短视频的SDK,导入demo项目时,发现两个问题:

1、频繁报错AAPT2 error: file not found。以为直接Sync重新编译就可以,但是仍旧频繁提醒引入资源错误。

查找资料发现Android的Gradle 3.0插件默认启动Aapt2,目的是为了改进增量资源的处理。

既然这样,那就打开gradle.properties,添加如下内容

android.enableAapt2=false。

重新编译通过~特此记录!

2、gradle文件添加依赖compile 'com.alivc.conan:AlivcConan:0.9.0',提示Failed to resolve。奇怪难道外部依赖库没有这个地址吗?搜了一下,搜不到。

 原来需要在repositories里添加maven{ url "http://maven.aliyun.com/nexus/content/repositories/releases" }。

 妥啦,全部解决!

By LiYing

猜你喜欢

转载自www.cnblogs.com/widgetbox/p/10749424.html