A failure occurred while executing com.android.build.gradle.tasks.MergeResources$FileGenerationWorkAction
> Error while processing D:\Android\WeishuProjects\Zszy\app\src\main\res\drawable\ic_right_gray_24dp.xml : Can't process attribute android:fillColor="@color/text_gray": references to other resources are not supported by build-time PNG generation.
解决方法:
使用Gradle Plugin 2.0以上:
android {
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}
使用Gradle Plugin 2.0以下,Gradle Plugin 1.5以上:
android {
defaultConfig {
// Stops the Gradle plugin’s automatic rasterization of vectors
generatedDensities = []
}
// Flag to tell aapt to keep the attribute ids around
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
Can't process attribute android:fillColor="@color/text_gray": references to other resources are not
升级为android studio3.0,gradle升级为4.1,报错: A failure occurred while executing com.android.build.gradle.tasks.MergeResources$FileGenerationWorkAction > Error while processing D:\Android\WeishuProjects\