No resource identifier found for attribute 'roundIcon' in package 'android'

后端 未结 4 1686
自闭症患者
自闭症患者 2020-12-03 06:51

I\'m trying to compile my Project,but in there is some error

Android manifest.xml

 

        
相关标签:
4条回答
  • 2020-12-03 07:31

    As already answered earlier, roundicon was first introduced in API Level 25. If you want to maintain a lower API level without increasing to >= 25 then

    go to the mipmap directory and delete the subdirectory "ic_roundicon" with all its files

    delete @res/mipmap/ic_roundicon

    0 讨论(0)
  • 2020-12-03 07:32

    I removed android:roundIcon from my manifest, but when compiling my project with API 24, the android:roundIcon property is still added to the AndroidManifest.xml.

    In order to resolve my problem, I had to update my API to version 25 and set comileSdkversion to 25.

    0 讨论(0)
  • 2020-12-03 07:38

    roundIcon is an attribute that was first introduced for Android O (8.0). So you have to change the app compile SDK version.

    0 讨论(0)
  • 2020-12-03 07:44

    roundIcon is an attribute that was first introduced for Android Nougat 7.1 (API level 25), therefore you have two available options based on the type of device you're targeting:

    • If you're building an app specifically for Android 7.1 or above, ensure that minSdkVersion and targetSdkVersion are set to 25 in your app's build.gradle:

    defaultConfig {
        minSdkVersion 25
        targetSdkVersion 25
    }
    

    • Alternatively, if you want to target older API levels, you will need to remove android:roundIcon from your manifest and only use android:icon.
    0 讨论(0)
提交回复
热议问题