统一google广告插件问题CommandInvokationFailure:无法重新打包资源

时间:2019-12-15 21:07:13

标签: android unity3d admob

实施统一的google ads插件后,我在将游戏构建为APK时遇到问题。在添加插件之前,构建已经开始。 问题是下面提到的错误:

CommandInvokationFailure:无法重新打包资源。

CommandInvokationFailure: Failed to re-package resources.
C:\Users\Hamid Red\AppData\Local\Android\Sdk\build-tools\29.0.2\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "C:/Users/Hamid Red/AppData/Local/Android/Sdk\platforms\android-29\android.jar" -F bin/resources.ap_ --extra-packages android.arch.lifecycle:androidx.arch.core:androidx.asynclayoutinflater:androidx.browser:androidx.coordinatorlayout:androidx.core:androidx.cursoradapter:androidx.customview:androidx.documentfile:androidx.drawerlayout:androidx.fragment:androidx.interpolator:androidx.legacy.coreui:androidx.legacy.coreutils:androidx.lifecycle.livedata:androidx.lifecycle.livedata.core:androidx.lifecycle:androidx.lifecycle.viewmodel:androidx.loader:androidx.localbroadcastmanager:androidx.print:androidx.slidingpanelayout:androidx.swiperefreshlayout:androidx.versionedparcelable:androidx.viewpager:android.support.compat:android.support.coreui:android.support.coreutils:android.support.fragment:android.support.mediacompat:android.support.v4:com.google.android.gms.ads.impl:com.google.android.gms.ads_base:com.google.android.gms.ads_identifier:com.google.android.gms.ads:com.google.android.gms.common:com.google.android.gms.gass:com.google.firebase.measurement:com.google.android.gms.measurement_base:com.google.firebase.measurement_impl:com.google.android.gms.measurement.sdk:com.google.android.gms.measurement.sdk.api:com.google.android.gms.stats:com.sglib.easymobile.androidnative:com.google.unity:com.google.unity.ads:com.unity3d.ads -S 

1 个答案:

答案 0 :(得分:0)

关注图片并解决依赖项:

enter image description here

如果仍然无法正常运行,则可能是由于android sdk过时了。

https://github.com/unity-plugins/Unity-Admob/issues/70

https://forum.unity.com/threads/solved-still-commandinvokationfailure-failed-to-re-package-resources-after-updating-android-sdk.496425/

可能会帮助您。