斗士狗 2015-08-18 14:39 采纳率: 0%
浏览 416

检索 item 父节点时出错: 没有发现与升级到 AppCompat v23后给定名称匹配的资源

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:

  • Started a new project
  • Set minimum SDK 4.0 (API Level 14)
  • Choose Blank Activity option
  • Used Default names for Activity Name and Layout Name
  • Hit Finish

After a few seconds Gradle finishes the build, and it throws me two errors with the following messages in file Teste4\app\build\intermediates/exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v23\values-v23.xml:

Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

Under File -> Project Structure -> Modules: app (left column) -> Properties tab, I have the following versions set up:

  • "Compile Sdk Version": Android 5.1 (API Level 22)
  • "Build Tools Version": 23.0.2

What should I do in order to fix this?

I already tried what was suggested in Stack Overflow question appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable', but it didn't work.

转载于:https://stackoverflow.com/questions/32075498/error-retrieving-parent-for-item-no-resource-found-that-matches-the-given-name

  • 写回答

22条回答 默认 最新

  • 衫裤跑路 2015-08-24 15:34
    关注

    I agree with the previous answer. Your compile SDK version must match the support library. Here is what I did.

    1. You can go to SDK Manager and under SDK Platform, install the Android 5.X with API level 23.
    2. Under Project Structure, change compile SDK Version to API 23, and Build Tools Version to 23.0.0

    Then it should build without problem.

    评论

报告相同问题?

悬赏问题

  • ¥15 arduino控制ps2手柄一直报错
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥85 maple软件,solve求反函数,出现rootof怎么办?
  • ¥15 求chat4.0解答一道线性规划题,用lingo编程运行,第一问要求写出数学模型和lingo语言编程模型,第二问第三问解答就行,我的ddl要到了谁来求了
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题