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

前端 未结 8 1993
陌清茗
陌清茗 2020-12-12 11:25

AndroidStudio 3.0 / Android Gradle plugin 3.0


  

8条回答
  •  無奈伤痛
    2020-12-12 12:26

    To support API SDK < 24 add the following line to your app build.gradle inside the android block:

    defaultConfig {
       vectorDrawables.useSupportLibrary = true
    }
    

    If your minSdkVersion is 24 or higher, then your issue will be resolved on its own, because VectorDrawables have full support starting with this API.

    See Android Developers: Vector Drawables Backward Compatibility Solution for details.

提交回复
热议问题