刚升级万Android studio 3 编译之后得到报错代码
:Error:Execution failed for task ':app:mergeDebugResources'.
> There were multiple failures while executing work items
> A failure occurred while executing com.android.build.gradle.tasks.MergeResources$FileGenerationWorkAction
> Error while processing H:\workspace\MyTaxi\app\src\main\res\drawable\ic_logo.xml : Can't process attribute android:strokeColor="@color/logoColor": references to other resources are not supported by build-time PNG generation. See http://developer.android.com/tools/help/vector-asset-studio.html for details.
网上搜索了很多关于这个报错资料,花费了很多时间,但是没有找到解决解决方法。最后猜测应该是svg的兼容性出错了,所以解决方法就是增加vector的兼容性。
解决方法:
在module的gradle文件中,在
android {
defaultConfig {//。。。。。 这这添加vectorDrawables.useSupportLibrary = true
}
}
本人实测解决问题。