安装好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. 互联网我来了 -- 2. js中&quot;异步/堵塞&quot;等概念的简析

    一.什么是"异步非堵塞式"? 这个名字听起来非常恶心难懂,但假设以 买内裤 这件事情来比喻运行程序的话就非常easy理解"异步非堵塞式"的涵义了. 比如你是一个 ...

  2. jenkins插件安装失败更改插件源

    看提示的日志说是下载失败,应该是网络问题 最好的办法就是更改下载源 [系统管理][管理插件][高级]升级站点项的的地址修改成 修改之后,安装了一下git的插件速度非常快,jenkins镜像地址列表ht ...

  3. MvcPager 分页示例 — 应用CSS样式

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 @model PagedList<string>   <h5>Digg style:</h5> ...

  4. 使用itchat分析自己的微信(1)

    1.准备工作 安装itchat pip install itchat参考 itchat内部函数 2.个人微信男女比例分析 ''' Have fun:itchat Author:杨 景 Time:201 ...

  5. python测试网页是否能正常登陆

    #!/usr/bin/python #encoding:utf-8 ##实现网页的登陆检查 import HTMLParser import urlparse import cookielib imp ...

  6. JSON-Schema 最科学的表单验证模式

    相关传送门: # JSON schema与表单验证 https://mp.weixin.qq.com/s?__biz=MjM5MTA1MjAxMQ==&mid=2651226711&i ...

  7. 【Hadoop基础教程】3、Hadoop之伪分布式环境搭建(转)

    伪分布式模式即单节点集群模式,所有的守护进程都运行在同一台机器上.这种模式下增加了代码调试功能,可以查看内存.HDFS文件系统的输入/输出,以及与其他守护进程交互.以hadoop用户远程登录K-Mas ...

  8. 简洁的BP及RBF神经网络代码

    BP神经网络 function [W,err]=BPTrain(data,label,hiddenlayers,nodes,type) %Train the bp artial nueral net ...

  9. oracle中把函数的执行权限赋个某个用户

    赋权:grant execute on function1 to ucr_dtb1;收回执行权限:revoke execute on function1 from ucr_dtb1; 在ucr_dtb ...

  10. MyBatis随笔

    前一阵参与了一个项目的搭建,为了快速开发再加上学一些新东西,准备采用React+Spring MVC+MyBatis的架构. 花了一些时间最终把Spring MVC+MyBatis打通. 这里总结下M ...