安装好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. 使用 mybatis + flying-0.9.4 的电商后端

    代码地址如下:http://www.demodashi.com/demo/12779.html mybatis.flying - 阳春 (Sunny-Spring) 项目介绍请见 flying-doc ...

  2. [1-6] 把时间当做朋友(李笑来)Chapter 6 【更多思考】 摘录

    记住,你不可能百分之百地有效率,至少不可能总是百分之百地有效率. 他们的效率很差.根源在于,他们其实只做简单的事情,而回避那些有难度的工作. 好像丢钱包的人都不是“故意”丢的一样,办事拖拉的人大多并非 ...

  3. NSTimer注意内存泄露(真该死)

    NSTimer可以用来执行一些定时任务,比较常用的方法就是: + (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti target:(id)aTar ...

  4. 阿里CI/CD、DevOps、分层自动化技术

    原文地址:http://www.infoq.com/cn/news/2017/01/alibaba-yunxiao-cicd-devops 在互联网时代,产品快速迭代的重要性不言而喻.不管是传统企业还 ...

  5. 了解MVC框架开发

    版权声明:本文为博主原创文章,未经博主允许不得转载. 前言:本篇文章我们浅谈下MVC各个部分,模型(model)-视图(view)-控制器(controller), 以及路由. 对于使用MVC的好处大 ...

  6. 获取、增加、修改、删除sqlserver字段描述及快速查看表字段与描述

    先看添加与删除字段描述 EXEC sys.sp_addextendedproperty @name = N'MS_Description', --添加Type字段说明 @value = N'屏蔽类型对 ...

  7. webstore 与 热编译的配置冲突

    这个勾去掉就会自动编译了!

  8. 浅谈BloomFilter【上】基本概念和实现原理

        在日常生活中.包括在设计计算机软件时,我们常常要推断一个元素是否在一个集合中.     比方在字处理软件中,须要检查一个英语单词是否拼写正确(也就是要推断 它是否在已知的字典中).在 FBI. ...

  9. esper 附录A

    A2 select irstream symbol, volume, price from MarketDate.win.time(5.5 sec) seconds seconds seconds s ...

  10. python基础-------python2.7教程学习【廖雪峰版】(二)

    2017年6月7日14:59:27任务:    看完python基础1.计算机顾名思义就是可以做数学计算的机器,因此,计算机程序理所当然地可以处理各种数值.但是,计算机能处理的远不止数值,还可以处理文 ...