使用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