我在Unity中創建遊戲時出現錯誤。第五天在尋找解決方案。我在互聯網上搜索了類似的問題,其中大部分與谷歌播放服務有關,但我沒有在我的項目中。我使用統一廣告,並從錯誤消息中獲得與其相關的內容。我重新安裝了Android SDK,下載了最新的構建工具,最後一次使用API 23,但仍然沒有任何內容。我已經試過: -copying aapt.exe從構建工具文件夾放到工具文件夾 -downloading的構建工具 舊版本的Android - 檢查路徑空間統一錯誤建立玩家aapt.exe
我沒有任何更多的想法......請大家幫忙,蔭使用Unity 5.3.1f1,Win8的64位
Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Android\sdk\build-tools\23.0.3\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Android/sdk\platforms\android-23\android.jar" -F bin/resources.ap_ --extra-packages com.google.android.gms.ads:com.google.android.gms.ads:com.google.android.gms:com.google.android.gms:android.support.v4:android.support.v4:com.unity3d.ads.android -S "C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\play-services-ads-8.3.0\res" -S "C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\play-services-ads-8.4.0\res" -S "C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res" -S "C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\play-services-basement-8.4.0\res" -S "C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\support-v4-23.1.0\res" -S "C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\support-v4-23.1.1\res" -S "C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res"
stderr[
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:2: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <RelativeLayout>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:61: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <RelativeLayout>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <RelativeLayout>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:52: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:44: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:19: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <View>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml:10: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_audio_toggle.xml: note: using v17 attributes; synthesizing resource com.PrettyFlyGames.Cubic:layout/unityads_button_audio_toggle for configuration v17.
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_pause.xml:8: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_button_pause.xml: note: using v17 attributes; synthesizing resource com.PrettyFlyGames.Cubic:layout/unityads_button_pause for configuration v17.
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:92: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <include>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:57: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from <LinearLayout>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:57: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <LinearLayout>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:44: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <TextView>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml:29: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\layout\unityads_view_video_play.xml: note: using v17 attributes; synthesizing resource com.PrettyFlyGames.Cubic:layout/unityads_view_video_play for configuration v17.
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\values\common_attrs.xml:13: error: Attribute "imageAspectRatioAdjust" has already been defined
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\values\common_attrs.xml:22: error: Attribute "imageAspectRatio" has already been defined
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\play-services-basement-8.3.0\res\values\common_attrs.xml:27: error: Attribute "circleCrop" has already been defined
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\play-services-ads-8.3.0\res\values\admob_ads_attrs.xml:10: error: Attribute "adSize" has already been defined
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\play-services-ads-8.3.0\res\values\admob_ads_attrs.xml:17: error: Attribute "adSizes" has already been defined
C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\play-services-ads-8.3.0\res\values\admob_ads_attrs.xml:20: error: Attribute "adUnitId" has already been defined
]
stdout[
Configurations:
(default)
Files:
drawable\unityads_background_button_pause.xml
Src:() C:\Users\Gosia & Kuba\Desktop\Kuba\UNITY\Cube\Temp\StagingArea\android-libraries\unityads-release\res\drawable\unityads_background_button_pause.xml
等等等等(......)這是很長
這是否幫助? http://forum.unity3d.com/threads/failed-to-re-package-resources-help.345837/ – kennytm