当前位置:网站首页>Vectordrawable error

Vectordrawable error

2022-06-11 20:31:00 Build a boat in the wind

Abnormal information :

Can't process attribute android:fillColor="@color/colorPrimary": 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.

resolvent :

modify app.gradle, Add the following

// stay gradle2.0 And above :

android {

    defaultConfig {

        vectorDrawables.useSupportLibrary = true

        }

}

// stay gradle 1.5 before

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"

    }

}



原网站

版权声明
本文为[Build a boat in the wind]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206112025368834.html