安装好android studio并且安装其它需要的SDK或组件后,根据向导生成新的项目,

编译或运行时可能会出现下面的错误:

Error:Error retrieving parent for item: No resource found that matches the given name “xxxxxxxxxx”

不大确定其它人的同样错误是否与本人是同一原因,在本人环境中的问题是“build.gradle(Module:app)”中的配置版本过高的问题。

本人生成项目时,目标android版本是4.2.2(API 17),生成的文件中编译相关版本位置的版本号是23以上。

修改两处地方后如下:

1. buildToolsVersion '22.0.1'

此处的版本号在运行android sdk manager(位置:android sdk目录下的tools目录中“android”)后,

在Tools目录下找到23版本之下的最高版本,本人环境中是22.0.1。

2. compile 'com.android.support:appcompat-v7:20.0.0'

此处的版本号可以在android sdk目录下的“extras/android/m2repository/com/android/support/appcompat-v7”目录下找到,

经过测试,版本号更改成版本23以下,可以编译通过,但是版本20以上在运行调试时会出错。

本人并不考虑android4.2.2以上版本的运行,所以并没有深究版本20以上的解决方法。

如果上面第二步还是编译出错,可以考虑把上面的“appcompat-v7”目录下的版本23以上目录删除,

并且在“maven-metadata.xml”文件中把版本23以上的设置行删除后,重新编译试一下。

ubuntu android studio 编译及运行错误Error retrieving parent for item: No resource found that matches the given name的更多相关文章

  1. Android错误之--Error retrieving parent for item: No resource found that matches the given name 'Theme.A

    错误提示:error: Error retrieving parent for item: No resource found that matches the given name 'Theme.A ...

  2. android中出现Error retrieving parent for item: No resource found that matches the Theme.AppCompat.Light

    styles.xml中<style name="AppBaseTheme" parent="Theme.AppCompat.Light">提示如下错 ...

  3. 【android】新手容易遇到的[error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.]Theme出错的问题

    一.概述 近期刚接手了一个项目,开发工具为eclipse,由于版本较低,且考虑到如果转android studio项目的话,会其他人的维护带来困难,所以想着还是维护项目原来的开发环境吧. 但是导入项目 ...

  4. error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.

    引用appcompat 类库提示 error: Error retrieving parent for item: No resource found that  matches the given ...

  5. error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.

    error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCom ...

  6. error: Error retrieving parent for item: No resource found that matches the given name &#39;Theme.AppCompat.Light&#39;.,appcompatv7

    error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCom ...

  7. 解决 Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'

    If you are looking for the solution in Android Studio : Right click on your app Open Module Settings ...

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

    改下build.gradle文件,将里面的compileSdkVersion改为23即可 apply plugin: 'com.android.application' android { compi ...

  9. 【Android】error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.NoActionBar'.

    问题: res 文件夹下的 values 下的 styles.xml <style name="Sherlock.Light.NoActionBar" parent=&quo ...

随机推荐

  1. AOP切面编程在android上的应用

    代码地址如下:http://www.demodashi.com/demo/12563.html 前言 切面编程一直是一个热点的话题,这篇文章讲讲一个第三方aop库在android上的应用.第三方AOP ...

  2. hdu 2871 Memory Control(线段树)

    题目链接:hdu 2871 Memory Control 题目大意:模拟一个内存分配机制. Reset:重置,释放全部空间 New x:申请内存为x的空间,输出左地址 Free x:释放地址x所在的内 ...

  3. 改变UITextField的Placeholder颜色

    通过 attributedPlaceholder 属性来改变 if([textField respondsToSelector:@selector(setAttributedPlaceholder:) ...

  4. ASP.NET CORE RAZOR :向 Razor 页面添加验证

    https://docs.microsoft.com/zh-cn/aspnet/core/tutorials/razor-pages/validation 本部分中向 Movie 模型添加了验证逻辑. ...

  5. mysql时间操作(时间差和时间戳和时间字符串的互转)

    mysql时间操作(时间差和时间戳和时间字符串的互转) 两个时间差: MySQL datediff(date1,date2):两个日期相减 date1 - date2,返回天数. select dat ...

  6. 经常使用socket函数具体解释

    经常使用socket函数具体解释 关于socket函数,每一个的意义和基本功能都知道,但每次使用都会去百度,參数究竟是什么,返回值代表什么意义.就是说用的少,也记得不够精确. 每次都查半天.常常烦恼于 ...

  7. csv文件中出现乱码的解决方法

    1.首先用UE打开CSV文件,发现没有乱码了. 2.然后新建一个txt文本,把CSV中的数据复制到txt文本中,保存格式为ANSI/ASCII. 3.复制txt文件,再把副本后缀改为CSV格式,再用E ...

  8. PowerBuilder--Aes128加解密

    通过C#开发Com控件,注册到系统,然后由pb通过OLEObject进行调用 原文:https://www.cnblogs.com/eric_ibm/archive/2012/07/06/dll.ht ...

  9. 如何使用eclipse创建Maven工程及其子模块

    http://blog.csdn.net/jasonchris/article/details/8838802 http://www.tuicool.com/articles/RzyuAj 1,首先创 ...

  10. Spring Cloud 微服务四:熔断器Spring cloud hystrix

    前言:在微服务架构中,一般都是进程间通信,有可能调用链都比较长,当有底层某服务出现问题时,比如宕机,会导致调用方的服务失败,这样就会发生一连串的反映,造成系统资源被阻塞,最终可能造成雪崩.在sprin ...