ERROR: In MenuView, unable to find attribute android:preserveIconSpacing

前端 未结 7 2122
自闭症患者
自闭症患者 2020-12-05 14:46

I had created an app and when tried to run,get an error like this.

ERROR: In  MenuView, unable to find attribute android:preserveIco         


        
相关标签:
7条回答
  • 2020-12-05 15:16

    I had the same problem in Eclipse, and fixed it by changing the API level by...

    • Right Clicking on the project
    • Open PROPERTIES > ANDROID
    • Changed the API level down to the one I had been using up to now.

    I think I was having the problem because I had just switched from API 21 to 22. I had read earlier that API 22 was trouble-some, so people were not using it.

    Hope that helps.

    0 讨论(0)
  • 2020-12-05 15:16

    I had this problem after upgrading my version of Eclipse (and Google Plugin):

    ERROR: In MenuView, unable to find attribute android:preserveIconSpacing

    I have solved it by deleting the appcompat_v7 project from my workspace (and my disk).

    And then creating a new Android project MyApp1 - which has recreated the appcompat_v7 project (here fullscreen):

    screenshot

    After that I have deleted the MyApp1 project again.

    0 讨论(0)
  • 2020-12-05 15:20

    this error because you are using an old Appcompat version .. update Appcompat

    to the newer version which is compatible with API 22

    then click on fix project properties ..

    working Fine with me :)

    Hope This Help!!

    0 讨论(0)
  • 2020-12-05 15:23

    if all the above answers don't work for you are probably missing

    apply plugin: 'com.google.gms.google-services'

    in you app build.gradle

    0 讨论(0)
  • 2020-12-05 15:25

    I fixed the problem by going to the path

    E:\adt-bundle-windows\sdk\extras\android\support\v7\appcompat\res\values\attrs.xml and Find "android:preserveIconSpacing"

    Then change it, From

    attr name="preserveIconSpacing" format="boolean"
    

    To

    attr name="android:preserveIconSpacing"
    

    also, remove

    format="boolean"
    
    0 讨论(0)
  • 2020-12-05 15:35

    I think switched the API Level is not a genuine solution. We can resolve this by follows these steps:

    1. Go to "C:\Users\AjaySharma\AppData\Local\Xamarin\Android.Support.v7.AppCompat\20.0.0\content\support\v7\appcompat\res\values\attrs.xml"

      (Pleae make sure , change USer name and Target version in path)

    2. Find "android:preserveIconSpacing" in file and remove or comment this entire line.

    3. Now, You can Build Seccessfully. For more details. Read this

    0 讨论(0)
提交回复
热议问题