Unity和Android交互出现一个问题

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


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'.
]
stdout[
Configurations:
(default)
v11
v14
hdpi
mdpi
xhdpi
xxhdpi


Files:
drawable\app_icon.png
Src: () res\drawable\app_icon.png
drawable\ic_launcher.png
Src: (hdpi) res\drawable-hdpi\ic_launcher.png
Src: (mdpi) res\drawable-mdpi\ic_launcher.png
Src: (xhdpi) res\drawable-xhdpi\ic_launcher.png
Src: (xxhdpi) res\drawable-xxhdpi\ic_launcher.png
layout\main.xml
Src: () res\layout\main.xml
values\strings.xml
Src: () res\values\strings.xml
values\styles.xml
Src: () res\values\styles.xml
Src: (v11) res\values-v11\styles.xml
Src: (v14) res\values-v14\styles.xml
AndroidManifest.xml
Src: () AndroidManifest.xml


Resource Dirs:
Type drawable
drawable\app_icon.png
Src: () res\drawable\app_icon.png
drawable\ic_launcher.png
Src: (hdpi) res\drawable-hdpi\ic_launcher.png
Src: (mdpi) res\drawable-mdpi\ic_launcher.png
Src: (xhdpi) res\drawable-xhdpi\ic_launcher.png
Src: (xxhdpi) res\drawable-xxhdpi\ic_launcher.png
Type layout
layout\main.xml
Src: () res\layout\main.xml
Type values
values\strings.xml
Src: () res\values\strings.xml
values\styles.xml
Src: () res\values\styles.xml
Src: (v11) res\values-v11\styles.xml
Src: (v14) res\values-v14\styles.xml
Including resources from package: F:\adt-bundle-windows-x86-20140624\sdk\platforms\android-20\android.jar
applyFileOverlay for drawable
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for transition
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
applyFileOverlay for menu
applyFileOverlay for mipmap
Processing image: res\drawable\app_icon.png
Processing image: res\drawable-hdpi\ic_launcher.png
Processing image: res\drawable-mdpi\ic_launcher.png
(processed image res\drawable-mdpi\ic_launcher.png: 82% size of source)
Processing image: res\drawable-xhdpi\ic_launcher.png
(processed image res\drawable-hdpi\ic_launcher.png: 77% size of source)
Processing image: res\drawable-xxhdpi\ic_launcher.png
(processed image res\drawable-xhdpi\ic_launcher.png: 74% size of source)
(processed image res\drawable\app_icon.png: 94% size of source)
(processed image res\drawable-xxhdpi\ic_launcher.png: 72% size of source)
(new resource id app_icon from drawable\app_icon.png #generated)
(new resource id ic_launcher from hdpi\drawable\ic_launcher.png #generated)
(new resource id ic_launcher from mdpi\drawable\ic_launcher.png #generated)
(new resource id ic_launcher from xhdpi\drawable\ic_launcher.png #generated)
(new resource id ic_launcher from xxhdpi\drawable\ic_launcher.png #generated)
(new resource id main from res\layout\main.xml)
]

解决方案

很简单,修改AndroidManifest.xml的内容。将如下内容修改成
android:theme="@android:style/Theme.NoTitleBar"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
那么res文件夹可以不必导入。

http://tieba.baidu.com/p/3147767224

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值