Ошибка сборки Unity3d, дубликат класса com.google.unity.ads - PullRequest
0 голосов
/ 30 октября 2019

Я не могу создать свое приложение, пожалуйста, помогите мне. Я перепробовал все, что видел в интернете:

  • удалить пакет Unity Ads
  • удалить библиотеку
  • изменить версию инструментов сборки SDK.

Ничего не работает.

Я использую jdk 1.8.161 (я пробовал их; 191, 181, но все еще не работает)

У меня нет объявлений юнитов в моем проекте.

CommandInvokationFailure: Gradle build failed.

C:/Program Files/Java/jdk1.8.0_161\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class com.google.unity.BuildConfig found in modules classes.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
  Duplicate class com.google.unity.ads.AdNetworkExtras found in modules classes.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
  Duplicate class com.google.unity.ads.Banner found in modules classes.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)


  Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUİLD FAILED in 1m 40s
]
stdout[
> Task :preBuild UP-TO-DATE
> Task :GoogleMobileAdsPlugin:preBuild UP-TO-DATE
> Task :GoogleMobileAdsPlugin:preReleaseBuild UP-TO-DATE
> Task :GoogleMobileAdsPlugin:checkReleaseManifest
> Task :GoogleMobileAdsPlugin:processReleaseManifest
> Task :checkReleaseManifest
> Task :generateReleaseBuildConfig
> Task :prepareLintJar
> Task :generateReleaseSources
> Task :GoogleMobileAdsPlugin:compileReleaseRenderscript NO-SOURCE
> Task :GoogleMobileAdsPlugin:generateReleaseRFile
> Task :GoogleMobileAdsPlugin:prepareLintJar
> Task :GoogleMobileAdsPlugin:generateReleaseSources
> Task :GoogleMobileAdsPlugin:javaPreCompileRelease
> Task :GoogleMobileAdsPlugin:compileReleaseJavaWithJavac
> Task :GoogleMobileAdsPlugin:bundleLibCompileRelease
> Task :javaPreCompileRelease
> Task :mainApkListPersistenceRelease
> Task :generateReleaseResValues
> Task :generateReleaseResources
> Task :mergeReleaseResources
> Task :createReleaseCompatibleScreenManifests
> Task :processReleaseManifest
> Task :processReleaseResources
> Task :compileReleaseJavaWithJavac
> Task :GoogleMobileAdsPlugin:mergeReleaseShaders
> Task :GoogleMobileAdsPlugin:compileReleaseShaders
> Task :GoogleMobileAdsPlugin:generateReleaseAssets
> Task :GoogleMobileAdsPlugin:packageReleaseAssets
> Task :mergeReleaseAssets
> Task :validateSigningRelease
> Task :signingConfigWriterRelease
> Task :checkReleaseDuplicateClasses FAILED


Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...