2016-05-31 29 views
2

我在Unity中創建遊戲時出現錯誤。第五天在尋找解決方案。我在互聯網上搜索了類似的問題,其中大部分與谷歌播放服務有關,但我沒有在我的項目中。我使用統一廣告,並從錯誤消息中獲得與其相關的內容。我重新安裝了Android SDK,下載了最新的構建工具,最後一次使用API​​ 23,但仍然沒有任何內容。我已經試過: -copying aapt.exe構建工具文件夾放到工具文件夾 -downloading的構建工具 舊版本的Android - 檢查路徑空間統一錯誤建立玩家aapt.exe

我沒有任何更多的想法......請大家幫忙,蔭使用Unity 5.3.1f1,Win8的64位 unity external tools paths android SDK

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 

等等等等(......)這是很長

編輯: sdk extras google play services folder

+0

這是否幫助? http://forum.unity3d.com/threads/failed-to-re-package-resources-help.345837/ – kennytm

回答

0

好,我跟着kennytm鏈接,並刪除了所有谷歌播放從項目&支持插件插件> Android的文件夾,遊戲成功地建造。有趣的是,我不記得添加這些插件或者它們出現時。但現在遊戲運作。 unity plugins

編輯: 插件來自GameAnalytics SDK我使用它,刪除文件後停止工作:d,但重新安裝到最新版本後一切恢復正常

0
+0

好吧,我已經刪除並重新安裝了谷歌播放服務,雖然我沒有在我的項目中使用它們。還安裝了其他附加功能,如下所示。我沒有Anroid Support Library在屏幕上下載,爲什麼?生成錯誤仍然發生。有趣的是,我檢查了'extras/google/google_play_services'文件夾,它似乎是空的,沒有文件夾「google-play-services_lib」... wtf?檢查新的屏幕; – drapichrust