Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23

后端 未结 24 1766
孤城傲影
孤城傲影 2020-11-22 02:30

I\'ve always programmed Android with Eclipse and decided to start migrating to Android Studio. I decided to use the same SDK I already had for Eclipse, then:

  • S
24条回答
  •  一个人的身影
    2020-11-22 03:21

    This happens because after updates Android Studio uses API version 23 by default.

    The following worked for me:

    Press Ctrl + Shift + Alt + S to get to the project structure page. Go to the properties tab and change 23.0.0 to 22.0.1 (or equivalent to what you were using earlier) in the build tool area and rebuild your project.

    If that doesn't work, go to gradle:app and then

    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
    

    Edit v7:23.0.0 to v7:22.2.1 as shown above and sync gradle. This will definitely work.

提交回复
热议问题