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

猜你喜欢

转载自blog.csdn.net/weixin_41995872/article/details/85275923
今日推荐