构建播放器时出错:命令调用失败:在 Unity3D 中为 Android 构建时,无法重新打包资源



我正在尝试将Heyzap与几个广告商SDK集成。为 iOS 构建没有问题,它只发生在为 Android 构建时。我尝试删除UnityAds AndroidManifest.xml文件,但它不会再次构建,所以我不得不把它放回去。我在 2 天前安装了全新的 Android 工作室,所以我认为 ADT 应该是最新版本?

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:sdkandroid-sdkbuild-tools23.0.3aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/sdk/android-sdkplatformsandroid-23android.jar" -F bin/resources.ap_ --extra-packages com.facebook.ads:com.chartboost.sdk.unity:com.google.android.gms:com.heyzap:com.hyprmx.android.sdk:com.unity3d.ads.android:com.pushok.test -S "C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesads-releaseres" -S "C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libres" -S "C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesHyprMX-SDKres" -S "C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsres"
stderr[
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesHyprMX-SDKresdrawable-mdpiclose.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_item_powered_by_google.xml:28: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <ImageView>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_item_powered_by_google.xml:28: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <ImageView>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_item_powered_by_google.xml:8: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_item_powered_by_google.xml: note: using v17 attributes; synthesizing resource com.Brixbyte.AwesomeArcadeTemplate:layout/place_autocomplete_item_powered_by_google for configuration v17.
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_item_prediction.xml:52: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <TextView>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_item_prediction.xml:35: note: removing attribute http://schemas.android.com/apk/res/android:layout_toEndOf from <TextView>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_item_prediction.xml:8: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <include>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_item_prediction.xml: note: using v17 attributes; synthesizing resource com.Brixbyte.AwesomeArcadeTemplate:layout/place_autocomplete_item_prediction for configuration v17.
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_progress.xml:2: note: removing attribute http://schemas.android.com/apk/res/android:indeterminateTint from <ProgressBar>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_progress.xml:2: note: removing attribute http://schemas.android.com/apk/res/android:indeterminateTintMode from <ProgressBar>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libreslayoutplace_autocomplete_progress.xml: note: using v21 attributes; synthesizing resource com.Brixbyte.AwesomeArcadeTemplate:layout/place_autocomplete_progress for configuration v21.
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml:2: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <RelativeLayout>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml:61: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <RelativeLayout>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml:27: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <RelativeLayout>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml:52: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml:44: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml:19: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <View>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml:10: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml: note: using v17 attributes; synthesizing resource com.Brixbyte.AwesomeArcadeTemplate:layout/unityads_button_audio_toggle for configuration v17.
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_pause.xml:8: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <View>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_pause.xml: note: using v17 attributes; synthesizing resource com.Brixbyte.AwesomeArcadeTemplate:layout/unityads_button_pause for configuration v17.
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_view_video_play.xml:92: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentStart from <include>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_view_video_play.xml:57: note: removing attribute http://schemas.android.com/apk/res/android:layout_alignParentEnd from <LinearLayout>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_view_video_play.xml:57: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <LinearLayout>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_view_video_play.xml:44: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <TextView>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_view_video_play.xml:29: note: removing attribute http://schemas.android.com/apk/res/android:layout_marginStart from <TextView>
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_view_video_play.xml: note: using v17 attributes; synthesizing resource com.Brixbyte.AwesomeArcadeTemplate:layout/unityads_view_video_play for configuration v17.
C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_libresvaluesbase_attrs.xml:11: error: Attribute "buttonSize" has already been defined
]
stdout[
Configurations:
 (default)
Files:
  drawableunityads_background_button_pause.xml
    Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresdrawableunityads_background_button_pause.xml
  drawableunityads_icon_play.xml
    Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresdrawableunityads_icon_play.xml
  drawableunityads_icon_speaker_base.xml
    Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresdrawableunityads_icon_speaker_base.xml
  drawableunityads_icon_speaker_triangle.xml
    Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresdrawableunityads_icon_speaker_triangle.xml
  drawableunityads_icon_speaker_waves.xml
    Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresdrawableunityads_icon_speaker_waves.xml
  layoutunityads_button_audio_toggle.xml
    Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml
  layoutunityads_button_pause.xml
    Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_pause.xml
  layoutunityads_view_video_paused.xml
    Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_view_video_paused.xml
  layoutunityads_view_video_play.xml
    Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_view_video_play.xml
  valuesstrings.xml
    Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresvaluesstrings.xml
  AndroidManifest.xml
    Src: () AndroidManifest.xml
Resource Dirs:
  Type drawable
    drawableunityads_background_button_pause.xml
      Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresdrawableunityads_background_button_pause.xml
    drawableunityads_icon_play.xml
      Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresdrawableunityads_icon_play.xml
    drawableunityads_icon_speaker_base.xml
      Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresdrawableunityads_icon_speaker_base.xml
    drawableunityads_icon_speaker_triangle.xml
      Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresdrawableunityads_icon_speaker_triangle.xml
    drawableunityads_icon_speaker_waves.xml
      Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresdrawableunityads_icon_speaker_waves.xml
  Type layout
    layoutunityads_button_audio_toggle.xml
      Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_audio_toggle.xml
    layoutunityads_button_pause.xml
      Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_button_pause.xml
    layoutunityads_view_video_paused.xml
      Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_view_video_paused.xml
    layoutunityads_view_video_play.xml
      Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsreslayoutunityads_view_video_play.xml
  Type values
    valuesstrings.xml
      Src: () C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesunityadsresvaluesstrings.xml
Including resources from package: C:sdkandroid-sdkplatformsandroid-23android.jar
applyFileOverlay for drawable
trying overlaySet Key=close.png
trying overlaySet Key=graybutton.9.png
trying overlaySet Key=greenbutton.9.png
trying overlaySet Key=hypr_progress_drawable.xml
trying overlaySet Key=next_button.xml
trying overlaySet Key=cast_ic_notification_0.png
trying overlaySet Key=cast_ic_notification_1.png
trying overlaySet Key=cast_ic_notification_2.png
trying overlaySet Key=cast_ic_notification_connecting.xml
trying overlaySet Key=cast_ic_notification_on.png
trying overlaySet Key=common_full_open_on_phone.png
trying overlaySet Key=common_google_signin_btn_icon_dark.xml
trying overlaySet Key=common_google_signin_btn_icon_dark_disabled.9.png
trying overlaySet Key=common_google_signin_btn_icon_dark_focused.9.png
trying overlaySet Key=common_google_signin_btn_icon_dark_normal.9.png
trying overlaySet Key=common_google_signin_btn_icon_dark_pressed.9.png
trying overlaySet Key=common_google_signin_btn_icon_light.xml
trying overlaySet Key=common_google_signin_btn_icon_light_disabled.9.png
trying overlaySet Key=common_google_signin_btn_icon_light_focused.9.png
trying overlaySet Key=common_google_signin_btn_icon_light_normal.9.png
trying overlaySet Key=common_google_signin_btn_icon_light_pressed.9.png
trying overlaySet Key=common_google_signin_btn_text_dark.xml
trying overlaySet Key=common_google_signin_btn_text_dark_disabled.9.png
trying overlaySet Key=common_google_signin_btn_text_dark_focused.9.png
trying overlaySet Key=common_google_signin_btn_text_dark_normal.9.png
trying overlaySet Key=common_google_signin_btn_text_dark_pressed.9.png
trying overlaySet Key=common_google_signin_btn_text_light.xml
trying overlaySet Key=common_google_signin_btn_text_light_disabled.9.png
trying overlaySet Key=common_google_signin_btn_text_light_focused.9.png
trying overlaySet Key=common_google_signin_btn_text_light_normal.9.png
trying overlaySet Key=common_google_signin_btn_text_light_pressed.9.png
trying overlaySet Key=common_ic_googleplayservices.png
trying overlaySet Key=common_plus_signin_btn_icon_dark.xml
trying overlaySet Key=common_plus_signin_btn_icon_dark_disabled.9.png
trying overlaySet Key=common_plus_signin_btn_icon_dark_focused.9.png
trying overlaySet Key=common_plus_signin_btn_icon_dark_normal.9.png
trying overlaySet Key=common_plus_signin_btn_icon_dark_pressed.9.png
trying overlaySet Key=common_plus_signin_btn_icon_light.xml
trying overlaySet Key=common_plus_signin_btn_icon_light_disabled.9.png
trying overlaySet Key=common_plus_signin_btn_icon_light_focused.9.png
trying overlaySet Key=common_plus_signin_btn_icon_light_normal.9.png
trying overlaySet Key=common_plus_signin_btn_icon_light_pressed.9.png
trying overlaySet Key=common_plus_signin_btn_text_dark.xml
trying overlaySet Key=common_plus_signin_btn_text_dark_disabled.9.png
trying overlaySet Key=common_plus_signin_btn_text_dark_focused.9.png
trying overlaySet Key=common_plus_signin_btn_text_dark_normal.9.png
trying overlaySet Key=common_plus_signin_btn_text_dark_pressed.9.png
trying overlaySet Key=common_plus_signin_btn_text_light.xml
trying overlaySet Key=common_plus_signin_btn_text_light_disabled.9.png
trying overlaySet Ke<message truncated>
看起来与

谷歌播放服务存在明显的合并冲突。

尝试删除C:UsersAkatsukiDocumentsUnity3Dawesome-arcade-templateTempStagingAreaandroid-librariesgoogle-play-services_lib文件夹。 使用 https://github.com/googleads/googleads-mobile-unity 插件安装所需的 google Play 服务。 如果您使用的是谷歌播放服务游戏API,请尝试使用此插件:https://github.com/playgameservices/play-games-plugin-for-unity

这些插件处理谷歌播放服务依赖项的方式与默认情况下的Heyzap略有不同。 我是Heyzap的工程师,我们正在考虑改变我们处理Unity的Google Play服务依赖项的方式。 我希望这对您有所帮助,如果这解决了您的问题,请告诉我。

相关内容

  • 没有找到相关文章

最新更新