java.lang.UnsupportedOperationException:This feature requires ASM

Hi Unity Team,

I do not understand what is so wrong with the Unity Engine that whenever I use an Ads SDK I end up getting a Gradle error.

I do not understand why Unity is not addressing such issues when there are so many people complaining about it.

I tried to find a solution for the Gradle error for about a month and then had to remove the ads from the game as I was not able to implement ads in my game, and then I thought to put some IAP in game and even that had issues and now today I bought an asset which was supposed to help me in having ads implemented easily.

I do not understand why you fail to explain what the error is exactly about and I also think that you do not have any plans of making Unity easier for those who are not from Game Development Background.

I saw many - many - many posts on these Gradle errors in many - many - many forums but nowhere there is a single solution to such a non-sensical error. There is no proper documentation of the same.

I though, was finally about to solve the errors and was able to build the .aab file after going through such torment of finding the solution but forgot to increase the build number and when I increased the build number and rebuilt the .aab file without CHANGING ANYTHING (Changed nothing else apart from Build Number for having it in Google Play) I started getting the same old errors but this time I am clueless regarding what is to be done.

Can you please help with my query as it has been about two months since I have my game ready but was battling with Ads and IAP .

Console Output :

Task :unityLibrary:preBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :launcher:preBuild UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :launcher:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :launcher:generateReleaseResources UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
Task :unityLibrary:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:generateReleaseResources UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources UP-TO-DATE
Task :unityLibrary:packageReleaseResources UP-TO-DATE
Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:processReleaseManifest UP-TO-DATE
Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseLibraryResources UP-TO-DATE
Task :launcher:mergeReleaseResources UP-TO-DATE
Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
Task :launcher:extractDeepLinksRelease UP-TO-DATE
Task :launcher:processReleaseManifest UP-TO-DATE
Task :launcher:bundleReleaseResources UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources UP-TO-DATE
Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:generateReleaseRFile UP-TO-DATE
Task :launcher:compileReleaseAidl NO-SOURCE
Task :launcher:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibCompileToJarRelease UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibRuntimeToJarRelease UP-TO-DATE
Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
Task :launcher:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE
Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
Task :launcher:processReleaseResources UP-TO-DATE
Task :launcher:compileReleaseJavaWithJavac UP-TO-DATE
Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseShaders UP-TO-DATE
Task :unityLibrary:compileReleaseShaders NO-SOURCE
Task :unityLibrary:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseShaders NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseAssets UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseJavaRes NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibResRelease NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseJniLibFolders UP-TO-DATE
Task :launcher:dexBuilderRelease FAILED
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseNativeLibs UP-TO-DATE
Task :unityLibrary:packageReleaseAssets
42 actionable tasks: 2 executed, 40 up-to-date

UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

error processing C:\Users\mailf.gradle\caches\transforms-2\files-2.1\8910e582e3690bfcb74001dffc7ffc7d\jetified-googlemobileads-unity-runtime.jar
java.lang.UnsupportedOperationException: This feature requires ASM7
at org.objectweb.asm.ClassVisitor.visitNestHost(ClassVisitor.java:150)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:541)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:391)
at com.android.builder.desugaring.DesugaringClassAnalyzer.analyze(DesugaringClassAnalyzer.java:153)
at com.android.builder.desugaring.DesugaringClassAnalyzer.analyzeJar(DesugaringClassAnalyzer.java:100)
at com.android.builder.desugaring.DesugaringClassAnalyzer.analyze(DesugaringClassAnalyzer.java:68)
at com.android.build.gradle.internal.tasks.DesugarIncrementalHelper.lambda$getInitalGraphData$4(DesugarIncrementalHelper.java:146)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:dexBuilderRelease’.

java.lang.UnsupportedOperationException: This feature requires ASM7

  • 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

BUILD FAILED in 5s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “bundleRelease”

Environment Variables:
USERDOMAIN = DESKTOP-2S3SRCG
asl.log = Destination=file
ProgramFiles = C:\Program Files
TMP = C:\Users\mailf\AppData\Local\Temp
PROCESSOR_ARCHITECTURE = AMD64
PROCESSOR_REVISION = 3d04
OneDriveConsumer = C:\Users\mailf\OneDrive
OS = Windows_NT
ALLUSERSPROFILE = C:\ProgramData
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
ProgramW6432 = C:\Program Files
USERPROFILE = C:\Users\mailf
JAVA_HOME = C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
CommonProgramFiles = C:\Program Files\Common Files
DriverData = C:\Windows\System32\Drivers\DriverData
ComSpec = C:\Windows\system32\cmd.exe
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules
ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
USERNAME = mailf
NUMBER_OF_PROCESSORS = 4
JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
TEMP = C:\Users\mailf\AppData\Local\Temp
Path = C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\M1 Licensing;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\dotnet;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Azure Data Studio\bin;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Users\mailf\AppData\Local\Programs\Python\Python310\Scripts;C:\Users\mailf\AppData\Local\Programs\Python\Python310;C:\Users\mailf\AppData\Local\Programs\Eclipse Adoptium\jdk-17.0.2.8-hotspot\bin;C:\Users\mailf\AppData\Local\Microsoft\WindowsApps;C:\Users\mailf.dotnet\tools;C:\Users\mailf\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files\Azure Data Studio\bin
COMPUTERNAME = DESKTOP-2S3SRCG
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
SystemDrive = C:
windir = C:\Windows
FPS_BROWSER_USER_PROFILE_STRING = Default
HOMEPATH = \Users\mailf
PUBLIC = C:\Users\Public
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
APPDATA = C:\Users\mailf\AppData\Roaming
OneDrive = C:\Users\mailf\OneDrive
PROCESSOR_LEVEL = 6
CommonProgramW6432 = C:\Program Files\Common Files
ProgramFiles(x86) = C:\Program Files (x86)
SystemRoot = C:\Windows
SESSIONNAME = Console
LOGONSERVER = \DESKTOP-2S3SRCG
LOCALAPPDATA = C:\Users\mailf\AppData\Local
HOMEDRIVE = C:
USERDOMAIN_ROAMINGPROFILE = DESKTOP-2S3SRCG
ProgramData = C:\ProgramData
BURST_ANDROID_MIN_API_LEVEL = 22

stderr[
error processing C:\Users\mailf.gradle\caches\transforms-2\files-2.1\8910e582e3690bfcb74001dffc7ffc7d\jetified-googlemobileads-unity-runtime.jar
java.lang.UnsupportedOperationException: This feature requires ASM7
at org.objectweb.asm.ClassVisitor.visitNestHost(ClassVisitor.java:150)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:541)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:391)
at com.android.builder.desugaring.DesugaringClassAnalyzer.analyze(DesugaringClassAnalyzer.java:153)
at com.android.builder.desugaring.DesugaringClassAnalyzer.analyzeJar(DesugaringClassAnalyzer.java:100)
at com.android.builder.desugaring.DesugaringClassAnalyzer.analyze(DesugaringClassAnalyzer.java:68)
at com.android.build.gradle.internal.tasks.DesugarIncrementalHelper.lambda$getInitalGraphData$4(DesugarIncrementalHelper.java:146)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:dexBuilderRelease’.

java.lang.UnsupportedOperationException: This feature requires ASM7

  • 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

BUILD FAILED in 5s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[

Task :unityLibrary:preBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :launcher:preBuild UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :launcher:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :launcher:generateReleaseResources UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
Task :unityLibrary:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:generateReleaseResources UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources UP-TO-DATE
Task :unityLibrary:packageReleaseResources UP-TO-DATE
Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:processReleaseManifest UP-TO-DATE
Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseLibraryResources UP-TO-DATE
Task :launcher:mergeReleaseResources UP-TO-DATE
Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
Task :launcher:extractDeepLinksRelease UP-TO-DATE
Task :launcher:processReleaseManifest UP-TO-DATE
Task :launcher:bundleReleaseResources UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources UP-TO-DATE
Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:generateReleaseRFile UP-TO-DATE
Task :launcher:compileReleaseAidl NO-SOURCE
Task :launcher:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibCompileToJarRelease UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibRuntimeToJarRelease UP-TO-DATE
Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
Task :launcher:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE
Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
Task :launcher:processReleaseResources UP-TO-DATE
Task :launcher:compileReleaseJavaWithJavac UP-TO-DATE
Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseShaders UP-TO-DATE
Task :unityLibrary:compileReleaseShaders NO-SOURCE
Task :unityLibrary:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseShaders NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseAssets UP-TO-DATE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseJavaRes NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibResRelease NO-SOURCE
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseJniLibFolders UP-TO-DATE
Task :launcher:dexBuilderRelease FAILED
Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseNativeLibs UP-TO-DATE
Task :unityLibrary:packageReleaseAssets
42 actionable tasks: 2 executed, 40 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <b5a1f7b6d39d4ca78ca284153b2ea92d>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action1[T] progress) (at :0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at :0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
Rethrow as BuildFailedException: Exception of type ‘UnityEditor.Build.BuildFailedException’ was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at :0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <6a5b55f2e18b419e9faedac06ac6af94>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

Build completed with a result of ‘Failed’ in 1544 seconds (1543644 ms)
UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

2 Likes

Did anyone find a solution for this?

I FOUND A WORKAROUND BUT IT IS A VERY HECTIC WORK TO DO.

The workaround is to export the game as a package by excluding the Dependency manager and mobile ads sdk and then creating a new project and implement the ads sdk in a fresh project and then import the created game as package.

However, the problem is that if I increase the bundle number , I get the same error once again. So even to just increase the bundle error I will have to redo the whole process that I mentioned.

1 Like

Well, if someone is stuck with the same issue, you can try doing the following :

Add the below content in Custom Progaurd :

# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

-injars       bin/admob-unity-plugin.jar
-outjars      bin/proguard-admob-unity-plugin.jar
#-libraryjars  <java.home>/lib/rt.jar
#-libraryjars  /libs/android-support-v4.jar
-libraryjars  <android.sdk>/platforms/android-16/android.jar
-libraryjars  /libs/GoogleAdMobAdsSdk-6.4.1.jar
-libraryjars  /libs/Unity-4.1-androidplayer.jar
-printusage   bin/proguard.txt
-printmapping bin/proguard-out.map

-renamesourcefileattribute SourceFile
-dontusemixedcaseclassnames
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,
                SourceFile,LineNumberTable,*Annotation*,EnclosingMethod

-keep,includedescriptorclasses public class com.google.** { *; }

# Keep - Library. Keep all public and protected classes, fields, and methods.
-keep public class * {
    public protected <fields>;
    public protected <methods>;
}

# Keep names - _class method names. Keep all .class method names. This may be
# useful for libraries that will be obfuscated again with different obfuscators.
-keepclassmembers, allowshrinking class * {
    java.lang.Class class$(java.lang.String);
    java.lang.Class class$(java.lang.String, boolean);
}

# Keep names - Native method names. Keep all native class/method names.
-keepclasseswithmembers, allowshrinking class * {
    native <methods>;
}

# Also keep - Enumerations. Keep the special static methods that are required in
# enumeration classes.
-keepclassmembers enum  * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keepclassmembers class * extends java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

And then try building the game, if the issue still persists, try following the below steps:

  • Delete folder: <PROJECT_FOLDER>\Library\Bee\Android
  • Android Resolver > Force Resolve
  • Build again

Even if the above steps do not work then do the following:

  • Delete “Android” folder present in the location : <PROJECT_FOLDER>\Library\Bee\Android

  • Increase the min API Level to Android 7.0

  • Android Resolver > Force Resolve

  • Build

23 Likes

me :
unity 2021.3.16.f1
Google Mobile Ads Unity Plugin v7.3.1

Google admob brought me to this problem , but you saved me.

  • Delete folder: <PROJECT_FOLDER>\Library\Bee\Android

I just did this. And build is succussed. Also I can see video ads now. THANK YOU!

Anyway, what is that folder??

13 Likes

I can confirm this worked first time.

:stuck_out_tongue:

You will have to redo the procedure every time before you build the app. (Delete folder <PROJECT_FOLDER>\Library\Bee\Android , Android Resolver > Force Resolve)

2 Likes

I increased the min API Level to Android 7.0 and worked for me. And make sure Android dependencies are resolved.

7 Likes

No workaround is working for me. Please share some solid workaround if anyone have.

This is not the case for me.

Thank you <3

1 Like
  • Google Admob Unity Plugin v7.3.1 or Higher
  • Delete the folder that is in Library\Bee_Android <= Delete this folder_
  • Full path => Main_Project_Folder\Library\Bee*Android <= Delete this folder*
  • I have tried this and my issue is resolved.
  • Thank You !!!
4 Likes

There is no Bee Folder inside the Library Folder.
Please share another workaround

4 Likes

Thank You so much!

This worked for me! Thank you. I’m using unity 2021.3.8 and GoogleMobileAds-v7.4.0(AdMob)

Thanks it worked!!!

1 Like

<PROJECT_FOLDER>\Library\Bee\Android

I dont have Bee folder guys

Increase the Min API Level to Android 7.0. Then Resolve Android Dependencies, and then Build.

4 Likes

Thanks, it worked!!!

Thanks! this worked for me, using Unity 2021.3.15f1.