Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
D:\GameDevelopment\adt-bundle-windows-x86\build-tools\android-4.4W\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "D:/GameDevelopment/adt-bundle-windows-x86/platforms/android-14\android.jar" -F bin/resources.ap_

http://answers.unity3d.com/questions/340592/android-build-woes.html

http://forum.unity3d.com/threads/failed-to-re-package-resources.123883/

使用了别人的接口代码 看看别人的Plugns目录下的res 里 和自己Eclipse 工程下的res目录里的相同XML 文件进行合并 不相同的拷贝进来。

stderr[
res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
]

因为新建Android项目自动引用了appcompat_v7  Libraries  生成了 values-v11 和 values-v14文件夹

values 文件夹 下的style.xml

<resources>

    <!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style> <!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style> </resources>

values-v11 文件夹 下的style.xml

<resources>

    <!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!-- API 11 theme customizations can go here. -->
</style> </resources>

values-v14 文件夹 下的style.xml

<resources>

    <!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style> </resources>

要么 引入android-support-v4.jar  和 android-support-v7-appcompat.jar  appcompat_v7.jar  右键 Add to build Path 应该就没问题

或者去掉引用把style.xml 里的 appCompat.Light 换成

<style name="AppBaseTheme" parent="android:Theme.Light"></style>

貌似这篇文章是解决方法:

http://blog.csdn.net/heirenheiren/article/details/7518596

http://zhidao.baidu.com/link?url=oBPfktDVuYf8NBl0-qvAgzPVt-XC0jt56-N-K4Fryc58DmgLya3fYb_1Il2NAOFu_RbHQQSZBcy8pgVgfdcyDvdGEgcvAFUVh-bkxzHJXA_

创建一个项目,还没有动它就有错
res中styles.xml里 <style name="AppBaseTheme" parent="Theme.AppCompat.Light">
错误Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
而且还没有R.java MainActivity里面的错误更多。
请大神帮助!!谢谢……
分享到:

 
2014-03-28 18:36提问者采纳
 
android版本问题,你把<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
错误Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.这段删掉,再build,这样R文件应该能生成 http://blog.csdn.net/jiadebin890724/article/details/25166045

1、导入某个现有工程文件夹后,出现R资源不能resolve的错误,导致程序无法编译运行,此时右键->properties->android,看最上面的taget又没有选择对,勾选当前可选的最高那个版本(即你本机已经安装的最高版本的SDK),点击apply,错误解决。

2、style.xml里出现样式无法识别:

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

也包括其他样式的此类错误,是因为:

8down voteaccepted

AppCompat is a library project. You need to reference the library project in your android project.

https://developer.android.com/tools/support-library/setup.html

Check the topic Adding libraries with resources.

去这个地址看解决方法吧。

参考我的另一篇博文:

点击打开链接

3、Activity中使用addContentView(layoutPlatform, lpLl);方法动态添加了一个子view,layoutPlatform是LinearLayout类型的,作为view,我想在layoutPlatform这个子view里与Activity通信,即在子view里点击某个按钮之后,让Activity更新界面内容,这个实现方法是,在Activity中实现CallBack借口,重写它的handleMessage方法,然后在子view的按钮点击处理函数里给Activity发送message即可。

发送消息的方式是 handler.sendMessage();

<style name="AppBaseTheme" parent="android:Theme.Light">

http://blog.csdn.net/lan120576664/article/details/34952877

http://blog.csdn.net/lan120576664/article/details/34952877
http://blog.csdn.net/comeonmyideal/article/details/8126186
http://stackoverflow.com/questions/18631643/no-resource-found-that-matches-the-given-name-androidtheme-holo-light
http://blog.csdn.net/yony2011/article/details/8441240 第3步貌似可以解决
http://blog.csdn.net/lincyang/article/details/21040489
http://www.linuxine.com/story/no-resource-found-matches-given-name-stylethemeappcompatlight 这个也ok 待测试
<style name="CustomActionBarTheme" parent="@android:style/Theme.AppCompat"> <item name="android:actionBarStyle">@style/MyActionBar</item> </style> http://dreamisx.blog.163.com/blog/static/1150048392012112024649308/

3. 錯誤的復原

若是我們原有的專案於建立的時候,  Build SDK 為 API 16 ,以及 Minimum Required SDK 是 API 8,在之前沒有去更動資源的狀況,且如上述有 Android API 8 的環境下匯入存在的專案時,會發生如上圖中,專案前的圖示有錯誤圖示,而在 Problems視窗 會看到下列兩個錯誤訊息:

  1. Description Resource Path Location Type error:
    Error retrieving parent for item: No resource found that matches the given name‘android:Theme.Holo.Light.DarkActionBar’. styles.xml
  2. Description Resource Path Location Type error:
    Error retrieving parent for item: No resource found that matches the given name‘android:Theme.Holo.Light’. styles.xml

這個狀況是因為,在建立 API 16 時,系統會為我們自動新增 values-v11 以及 values-v14 這兩個分別是 API 11 以及 API 14 的資源目錄,所以在 API 8 為核心的狀況下,系統是不認得他的。而解決方式有二:

  1. 直接刪除掉這兩個用不到的資源目錄。
  2. 更改核心:在專案名稱上點擊滑鼠右鍵,選擇 Properties 再選到左側列表的 Android 選項,可以看到如下的畫面,

變更 Project Build Target

這時候,勾選 Android 4.1 或是 Google APIs (API Level 16) 的版本;接著再點擊工具列的Project > Clean 選擇該專案,讓 R.java 重建即可。

而這個動作要注意到 Project > Build Automatically 是否有被勾選,否則,系統只會很單純地幫我們把 R.java 清掉而已。

Build Automatically 在執行 Clean 之後,會再自動產生 R.java

http://www.myexception.cn/android/1080428.html

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details. ShareSDK 也有这种错误的更多相关文章

  1. 打包Android:Error building Player: CommandInvokationFailure

    错误log Error building Player: CommandInvokationFailure: Unable to determine the tools version of the ...

  2. Unity出现 error building player exception android (invocation failed)

    今天在编译Android的时候出现这个错误 error building player exception android (invocation failed) 百度谷歌之后,看到xuanyuson ...

  3. Error building Player: Win32Exception: ApplicationName=‘xxxxxxxxxxxxxxxxxx//sdk\tools\zipalign.exe' , CommandLine='4 的解决办法

    更新了安卓SDK后,有时候Unity编译失失败,报错类似 Error building Player: Win32Exception: ApplicationName='D:/Program File ...

  4. 【Unity3D】生成工程报错解决—UnityEditor.HostView:OnGUI() Error building Player: Couldn't build player because of unsupported data on target platform.

    错误 错误1:An asset is marked as dont save, but is included in the build: unityEditor.HostView:OnGUI() 错 ...

  5. Error building Player: UnityException: Bundle Identifier has not been set up correctly

    错误提示: Error building Player: UnityException: Bundle Identifier has not been set up correctlyPlease s ...

  6. 【已解决】unity4.2.0f4 导出Android工程报错:Error building Player: ArgumentException: Illegal characters in path. [unity导出android工程 报错,路径含有非法字符]

    使用unity3D开发的一个客户端,需要导出为Android工程,然后接入一些第三方android SDK. unity版本 操作系统为: OS 名称: Microsoft Windows 7 旗舰版 ...

  7. Error building Player: Exception: Could not start java

    4.6.1发布Flash版本出错.解决方法:把C:\Windows\System32\java.exe复制到C:\Windows\SysWOW64下即可

  8. Error building Player: Win32Exception: ApplicationName=&#39;E:/adt-20140702/sdk\tools\zipalign.exe&#39;, Com

    1.原因 更新sdk后报错..由于版本号不同,zipalign.exe所处路径不同 2.解决的方法 在sdk路径下搜索zipalign.exe .然后拷贝到报错内容中制定的路径即可了.

  9. configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.

    configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. 一.错误发生情景: 在安装gcc时,执行.c ...

随机推荐

  1. SQL Server 编程入门经典(3)之T-SQL基本语句

    本章内容简介: 如何从数据库检索数据(SELECT) 如何向表中插入数据(INSERT) 如何适当更新数据(UPDATE) 如何删除表中数据(DELETE) 3.1 基本SELECT语句  如果你在此 ...

  2. 怎么改svn的登陆账号

    svn 我想大家都很熟悉.用的也很多.可是上次遇到一个问题 ,就是用别人的svn下载的代码.选择了记住账号密码.结果提交的时候 还是用别人的不大好.结果就想改成自己的账号.第一次改 找了半天.今天给大 ...

  3. Javascript之响应式相册

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/stri ...

  4. SVN Application

    一.SVN客户端:TortoiseSvn 下载地址: http://tortoisesvn.net/downloads.html 安装完后重启, 右击就可以使用SVN命令 首先, 从服务器版本库那边 ...

  5. Cocos2d-x开发实例介绍帧动画使用

    下面我们通过一个实例介绍一下帧动画的使用,这个实例如下图所示,点击Go按钮开始播放动画,这时候播放按钮标题变为Stop,点击Stop按钮可以停止播放动画. 下面我们再看看具体的程序代码,首先看一下看H ...

  6. 设置一个View的背景图片的集中方法

    控制器view的背景图片的方法, 四种: 1.直接在控制器view上添加一个imageView大小设置的和view一样 UIImageView *beijingimage = [UIImageView ...

  7. (转)ASP.NET并发处理

    对于DB服务器同样也可以调整最大连接数来做优化. 在调整优化好最大连接数之后,就只有软硬件负载均衡了.硬件负载均衡能够直接通过智能交换机实现,处理能力强,而且与系统无关,但是价格贵,配置困难,不能区分 ...

  8. 【转载】干货来袭!Linux小白最佳实践:《超容易的Linux系统管理入门书》(连载七)LAMP集成安装

    学Linux做程序开发也好,做系统管理也好,做网络管理员也好,做系统运维也好,不会LAMP和LNMP,那就等于连皮毛都不会!本篇是文字版的LAMP集成安装,下次连载我们要介绍LNMP的文字版安装.有喜 ...

  9. Javascript中的函数

    Javascript中的函数 1.什么是函数 函数是被命名的,独立的,完成特定功能的代码段.其可能给调用它的程序返回值,我们把这个代码段就称之为"函数". 被命名的:函数大部分都是 ...

  10. Java编程思想之字符串

    来自:Java编程思想(第四版) 第十三章 字符串   字符串操作是计算机程序中最常见的行为.   String对象是不可变的.查看JDK文档你就会发现,String类中每一个看起来会修改String ...