安装好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. ckeditor编辑时 回车 生成一个段落p、解决首行缩进问题

    使用ckeditor编辑器时,会自己主动加入上的标签,按回车也会自己主动加入上同样的标签 查看ckeditor编辑器源代码时会看到,点击回车显示的<p> </p> static ...

  2. Cocos2d-x教程(35)-三维拾取Ray-AABB碰撞检測算法

    欢迎增加Cocos2d-x 交流群:193411763 转载时请注明原文出处 :http://blog.csdn.net/u012945598/article/details/39927911 --- ...

  3. 搭建Squid反向代理服务器

    好吧,更新个文章,有段时间没写技术博文了.今天就说说squid反向代理这个服务,当然,这是在Linux下配置完成的.说自己没偏见似乎不可能 了.大概是相对喜欢Linux而已.但我从不否认Windows ...

  4. [原创]个人工具 - 对APK极限压缩并对齐的工具(58.ReExtremeZipAndAlignAPK)

    2014年9月13日:RootExplorer_v2.21.1_Aligned对齐后:在华为U8860(2.3.6).酷派8150S(4.0.3)上安装滑动列表时,崩溃.原版本(已对齐)则OK.(不知 ...

  5. hdu 5371 Hotaru&#39;s problem【manacher】

    题目链接: http://acm.hdu.edu.cn/showproblem.php? pid=5371 题意: 给出一个长度为n的串,要求找出一条最长连续子串.这个子串要满足:1:能够平均分成三段 ...

  6. ArrayList remove注意事项

    例子1: List<Integer>list=new ArrayList<>(); list.add(1); list.add(2); list.add(2); list.ad ...

  7. [译]GLUT教程 - 改变窗体大小

    Lighthouse3d.com >> GLUT Tutorial >> Basics >> Resizing the Window 上一章的例子创建了两个窗体,命 ...

  8. File 的基本操作

    package xinhuiji_day07; import java.io.File;import java.io.IOException; public class FileTest { /**  ...

  9. k8s集群部署

    环境: 两台虚拟机, 10.10.20.203 部署docker.etcd.flannel.kube-apiserver.kube-controller-manager.kube-scheduler ...

  10. 使用JMeter测试Java项目

    一. Apache JMeter工具 1)简介 JMeter——一个100%的纯Java桌面应用,它是Apache组织的开放源代码项目,它是功能和性能测试的工具.JMeter可以用于测试静态或者动态资 ...