No resource identifier found for attribute '…' in package 'com.app…'

后端 未结 7 997
梦谈多话
梦谈多话 2020-11-29 20:10

I\'ve imported a project from Eclipse to Android studio. It utilizes a custom view:

xmlns:app="http://schemas.android.com/apk/res-auto"
7条回答
  •  清歌不尽
    2020-11-29 20:15

    I was facing the same problem and solved it using the below steps:

    Add this in your app's build.gradle

    android {
        defaultConfig {
            vectorDrawables.useSupportLibrary = true
        }
    }
    

    Use namespace:

    xmlns:app="http://schemas.android.com/apk/res-auto"

    Then use:

    app:srcCompat="@drawable/your_vector_drawable_here"

提交回复
热议问题