- Home /
Unity build with admob giving "r8 debrecated" errors
I always get the same error when I use admob or a similar service. There are a lot of topics about this error in the forums, but the solutions I tried did not work. Here are the solutions I tried: Creating custom gradle.properties and deleting the r8 code did not work. Create a custom base gradle template and change 'com.android.tools.build:gradle:3.6.0' to 'com.android.tools.build:gradle:3.4.0' did not work. change target api "Target API Level" to "Android 11.0 (API level 30)" did not work please can somebody help me?
> Starting a Gradle Daemon, 1
> incompatible and 8 stopped Daemons
> could not be reused, use --status for
> details
>
> Configure project :launcher WARNING:
> The option 'android.enableR8' is
> deprecated and should not be used
> anymore. It will be removed in a
> future version of the Android Gradle
> plugin, and will no longer allow you
> to disable R8.
>
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :launcher:preBuild UP-TO-DATE
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild
> UP-TO-DATE Task
> :unityLibrary:preReleaseBuild
> UP-TO-DATE Task
> :launcher:preReleaseBuild UP-TO-DATE
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild
> UP-TO-DATE Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl
> NO-SOURCE Task
> :unityLibrary:packageReleaseRenderscript
> NO-SOURCE Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript
> NO-SOURCE Task
> :unityLibrary:compileReleaseAidl
> NO-SOURCE Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript
> NO-SOURCE Task
> :unityLibrary:compileReleaseRenderscript
> NO-SOURCE Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources
> Task
> :launcher:generateReleaseBuildConfig
> Task :launcher:compileReleaseAidl
> NO-SOURCE Task
> :unityLibrary:generateReleaseBuildConfig
> Task
> :launcher:compileReleaseRenderscript
> NO-SOURCE Task
> :unityLibrary:generateReleaseResValues
> Task
> :unityLibrary:generateReleaseResources
> Task
> :launcher:mainApkListPersistenceRelease
> Task
> :launcher:generateReleaseResValues
> Task
> :launcher:generateReleaseResources
> Task
> :launcher:createReleaseCompatibleScreenManifests
> Task :launcher:extractDeepLinksRelease
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources
> Task :launcher:prepareLintJar Task
> :unityLibrary:packageReleaseResources
> Task
> :unityLibrary:extractDeepLinksRelease
> Task
> :unityLibrary:parseReleaseLocalResources
> Task :unityLibrary:mergeReleaseShaders
> Task
> :unityLibrary:compileReleaseShaders
> Task
> :unityLibrary:generateReleaseAssets
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseBuildConfig
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksRelease
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJarForPublish
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseShaders
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseShaders
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseAssets
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseAssets
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseJavaRes
> NO-SOURCE Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseLibraryResources
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseJniLibFolders
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibResRelease
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile
> Task
> :launcher:checkReleaseDuplicateClasses
> FAILED Task
> :unityLibrary:packageReleaseAssets
> Task
> :unityLibrary:compileReleaseLibraryResources
> Task
> :unityLibrary:prepareLintJarForPublish
> Task
> :unityLibrary:processReleaseManifest
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac
> Task
> :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseNativeLibs
> 35 actionable tasks: 35 executed
>
> UnityEngine.GUIUtility:ProcessEvent
> (int,intptr,bool&)
> 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.google.android.gms.tasks.CancellationToken
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.CancellationTokenSource
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.Continuation
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.OnCanceledListener
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.OnCompleteListener
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.OnFailureListener
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.OnSuccessListener
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.OnTokenCanceledListener
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.RuntimeExecutionException
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.SuccessContinuation
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.Task
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.TaskCompletionSource
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.TaskExecutors
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.TaskExecutors$zza
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.Tasks
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.Tasks$zza
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.Tasks$zzb
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.Tasks$zzc
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zza found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzb found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzc found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzd found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zze found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzf found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzg found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzh found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzi found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzj found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzk found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzl found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzm found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzn found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzo found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzp found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzq found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzr found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzs found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzt found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzu found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzu$zza
> found in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzv found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzw found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Duplicate class
> com.google.android.gms.tasks.zzx found
> in modules
> com.google.android.gms.play-services-tasks-17.0.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.0.0:)
> and
> com.google.android.gms.play-services-tasks-17.2.0-runtime.jar
> (:com.google.android.gms.play-services-tasks-17.2.0:)
> Go to the documentation to learn how
> to Fix dependency resolution errors.
>
> 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 19s Picked up
> JAVA_TOOL_OPTIONS:
> -Dfile.encoding=UTF-8
>
> UnityEngine.GUIUtility:ProcessEvent
> (int,intptr,bool&)
Your answer
Follow this Question
Related Questions
how to remove vungle sdk properly from my unity project ? 0 Answers
Displaying Admob's banner ad in game scene 0 Answers
Can we show 3d ads in the game like on billboards? 0 Answers
How do you monetize games for Windows Phone, Windows (PC) and the Web? 0 Answers
AdMob RewardBasedVideoAd, App crash after reward video closed (Android) 5 Answers