1. 程式人生 > >references to other resources are not supported by build-time PNG generation.

references to other resources are not supported by build-time PNG generation.

使用vectorDrawables資源時,容易遺漏“vectorDrawables.useSupportLibrary = true”

android {
    compileSdkVersion 25
    defaultConfig {
        applicationId "com.hj.wanandroidhj"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true // 新增上這一句就不會出現下面的錯誤了
    }

導致以下問題

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.

參考地址:stackoverflow