Возможные ошибки
Ошибки при интеграции плагина
Полноэкранная реклама Unity Ads не отображается, ошибка «Incorrect fullscreen view»
Во время запуска полноэкранной рекламы на iOS возможна ошибка «Incorrect fullscreen view». При возникновении данной проблемы проверьте, что в настройках Build Phases
, секции Copy Bundle Resource добавлено значение YandexMobileAdsBundle.bundle
. Если значение отсутствует, добавьте его.
![](https://yastatic.net/s3/doc-binary/src/dev/mobile-ads/ru/images/bundle-unity.png)
Ошибки в Мобильной медиации
Дублирование классов «Duplicate class com.unity3d.ads.BuildConfig found in modules...»
Если у вас установлен модуль от Unity Ads, билд не соберется и возникнет ошибка дублирования классов:
CommandInvokationFailure: Gradle build failed.
/Applications/Unity/Hub/Editor/2021.3.6f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2021.3.6f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.unity3d.ads.BuildConfig found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.IUnityAdsInitializationListener found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.IUnityAdsLoadListener found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.IUnityAdsShowListener found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.IUnityAdsTokenListener found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.UnityAds found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.UnityAds$UnityAdsInitializationError found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.UnityAds$UnityAdsLoadError found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.UnityAds$UnityAdsShowCompletionState found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.UnityAds$UnityAdsShowError found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.UnityAdsBaseOptions found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.UnityAdsLoadOptions found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.UnityAdsShowOptions found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.metadata.InAppPurchaseMetaData found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.metadata.MediationMetaData found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
Duplicate class com.unity3d.ads.metadata.MetaData found in modules jetified-UnityAds-runtime.jar (:UnityAds:) and jetified-com.unity3d.ads.unity-ads-4.2.1-runtime.jar (:com.unity3d.ads.unity-ads-4.2.1:)
...
Чтобы исправить ошибку, удалите модуль Unity Ads (Window → Package Manager).
Была ли статья полезна?
Предыдущая
Следующая