Unity CommandInvokationFailure:无法重新打包资源

时间:2016-02-01 23:17:28

标签: android unity3d

我一直在尝试让Unity为Android构建并遇到此错误(我在Mac上运行,如果这有任何区别):

Error building Player: CommandInvokationFailure: Failed to re-package     resources. See the Console for details.
/Users/garyjohnston/Library/Android/sdk/build-tools/23.0.2/aapt package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "/Users/garyjohnston/Library/Android/sdk/platforms/android-23/android.jar" -F bin/resources.ap_

stderr[
AndroidManifest.xml:23: Tag <provider> attribute authorities hasinvalid character '|'.
]
stdout[
Configurations:
 (default)
 xhdpi-v4

Files:
  drawable/app_banner.png
Src: (xhdpi-v4) res/drawable-xhdpi/app_banner.png
  drawable/app_icon.png
Src: () res/drawable/app_icon.png
  values/strings.xml
Src: () res/values/strings.xml
  AndroidManifest.xml
Src: () AndroidManifest.xml

Resource Dirs:
  Type drawable
drawable/app_banner.png
  Src: (xhdpi-v4) res/drawable-xhdpi/app_banner.png
drawable/app_icon.png
  Src: () res/drawable/app_icon.png
  Type values
values/strings.xml
  Src: () res/values/strings.xml
Including resources from package: /Users/garyjohnston/Library/Android/sdk/platforms/android-23/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-xhdpi/app_banner.png
Processing image: res/drawable/app_icon.png
(processed image res/drawable/app_icon.png: 94% size of source)
(processed image res/drawable-xhdpi/app_banner.png: 93% size of source)
(new resource id app_banner from xhdpi-v4/drawable/app_banner.png #generated)
(new resource id app_icon from drawable/app_icon.png #generated)
]

enter image description here

我已经尝试过我在网上找到的大多数答案,到目前为止,没有任何效果。请帮忙。

1 个答案:

答案 0 :(得分:1)

看起来您的Android清单中包含无效字符“|”。请检查您的清单文件在语法上是否正确。

我希望有所帮助!

编辑: 如果您可以共享清单文件,我将能够更具体地帮助指出错误。