Unity build Error - ' SDK incompatible with the package ' How do I solve?

Hi, I’ve been really stressed with Unity, because I can’t build my project after using Unity Advertisement with Mediation package, and I couldn’t find solution.

When I build it, this appears.

And this is the Error log.

BuildFailedException: Build canceled
Unity.Services.Mediation.Build.Editor.AndroidNativeDependenciesPreBuildCheck.DisplayIssueDetectedDialog (System.Boolean noDialog, System.String issue, Unity.Services.Mediation.Build.Editor.AndroidNativeDependenciesPreBuildCheck+UserAction action) (at Library/PackageCache/com.unity.services.mediation@1.0.5/Editor/Build/PreBuild/AndroidNativeDependenciesPreBuildCheck.cs:144)
Unity.Services.Mediation.Build.Editor.AndroidNativeDependenciesPreBuildCheck.ValidateDependencies (System.Boolean noDialog) (at Library/PackageCache/com.unity.services.mediation@1.0.5/Editor/Build/PreBuild/AndroidNativeDependenciesPreBuildCheck.cs:92)
Unity.Services.Mediation.Build.Editor.AndroidNativeDependenciesPreBuildCheck.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.services.mediation@1.0.5/Editor/Build/PreBuild/AndroidNativeDependenciesPreBuildCheck.cs:48)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass16_0.b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at <4ce403b7cdf744109283ae55cdc24285>:0)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List1[T] oneInterfaces, System.Action1[T] invocationOne, System.Collections.Generic.List1[T] twoInterfaces, System.Action1[T] invocationTwo, System.Boolean exitOnFailure) (at <4ce403b7cdf744109283ae55cdc24285>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Error building Player: BuildFailedException: Build canceled

Build completed with a result of ‘Failed’ in 507 seconds (507357 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <4ce403b7cdf744109283ae55cdc24285>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <4ce403b7cdf744109283ae55cdc24285>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
[Package Manager Window] Cannot perform upm operation: Unable to perform online search:
Request [GET https://packages.unity.com/-/api/search?host=editor&provider=enterprise] failed with status code [504] [NotFound].
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
[Package Manager Window] Error searching for packages.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
`
MY UNITY EDITOR VERSION : 2022.1.23f1
MY PACKAGE MANAGER :

I tried adding Custom Main Gradle Template, remove all binaries(.aar, .jar), and resolve, but it didn’t work, and causes error below.
Error Log :
`
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Configure project :launcher

WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:launcher:lintVitalRelease’.

This project uses AndroidX dependencies, but the ‘android.useAndroidX’ property is not enabled. Set this property to true in the gradle.properties file and retry.

The following AndroidX dependencies are detected: androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.fragment:fragment:1.0.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.core:core:1.2.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.2.0, androidx.startup:startup-runtime:1.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.tracing:tracing:1.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.browser:browser:1.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runti me:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:launcher:lintVitalRelease’.

This project uses AndroidX dependencies, but the ‘android.useAndroidX’ property is not enabled. Set this property to true in the gradle.properties file and retry.

The following AndroidX dependencies are detected: androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.fragment:fragment:1.0.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.core:core:1.2.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.2.0, androidx.startup:startup-runtime:1.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.tracing:tracing:1.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.browser:browser:1.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runti me:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0

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

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

Configure project :launcher

WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
]
`
So I added Custom Gradle Properties Template, and added ‘android.useAndroidX=true’ in properties script. But still got the errors.
Thank you for reading these, and any help would be greatly appreciated.

1 Like

Which errors did you get?

I believe you’re nearly there, I’d recommend also adding this to your gradleTemplate.properties file:

android.enableJetifier=true

Thanks for reaching out!

I also added ‘android.enableJetifier=true’ just before, but still got the errors.

Error Log :

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

Configure project :launcher

WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:launcher:lintVitalRelease’.

Could not resolve all artifacts for configuration ‘:launcher:debugRuntimeClasspath’.
Did not resolve ‘android.arch.lifecycle:runtime:1.1.1’ which is part of the dependency lock state
Did not resolve ‘com.android.support:support-compat:26.1.0’ which is part of the dependency lock state
Did not resolve ‘android.arch.core:runtime:1.1.1’ which is part of the dependency lock state
Did not resolve ‘android.arch.lifecycle:viewmodel:1.1.1’ which is part of the dependency lock state
Did not resolve ‘android.arch.lifecycle:livedata:1.1.1’ which is part of the dependency lock state
Did not resolve ‘com.android.support:support-core-utils:26.1.0’ which is part of the dependency lock state
Did not resolve ‘android.arch.lifecycle:extensions:1.1.1’ which is part of the dependency lock state
Did not resolve ‘com.android.support:support-core-ui:26.1.0’ which is part of the dependency lock state
Resolved ‘androidx.lifecycle:lifecycle-service:2.0.0’ which is not part of the dependency lock state
Did not resolve ‘com.android.support:support-annotations:26.1.0’ which is part of the dependency lock state
Resolved ‘androidx.lifecycle:lifecycle-process:2.0.0’ which is not part of the dependency lock state
Did not resolve ‘android.arch.lifecycle:livedata-core:1.1.1’ which is part of the dependency lock state
Did not resolve ‘android.arch.lifecycle:common:1.1.1’ which is part of the dependency lock state
Did not resolve ‘com.android.support:support-fragment:26.1.0’ which is part of the dependency lock state
Resolved ‘androidx.lifecycle:lifecycle-extensions:2.0.0’ which is not part of the dependency lock state
Did not resolve ‘android.arch.core:common:1.1.1’ which is part of the dependency lock state

  • 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 27s
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\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “assembleRelease”
stderr[

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:launcher:lintVitalRelease’.

Could not resolve all artifacts for configuration ‘:launcher:debugRuntimeClasspath’.
Did not resolve ‘android.arch.lifecycle:runtime:1.1.1’ which is part of the dependency lock state
Did not resolve ‘com.android.support:support-compat:26.1.0’ which is part of the dependency lock state
Did not resolve ‘android.arch.core:runtime:1.1.1’ which is part of the dependency lock state
Did not resolve ‘android.arch.lifecycle:viewmodel:1.1.1’ which is part of the dependency lock state
Did not resolve ‘android.arch.lifecycle:livedata:1.1.1’ which is part of the dependency lock state
Did not resolve ‘com.android.support:support-core-utils:26.1.0’ which is part of the dependency lock state
Did not resolve ‘android.arch.lifecycle:extensions:1.1.1’ which is part of the dependency lock state
Did not resolve ‘com.android.support:support-core-ui:26.1.0’ which is part of the dependency lock state
Resolved ‘androidx.lifecycle:lifecycle-service:2.0.0’ which is not part of the dependency lock state
Did not resolve ‘com.android.support:support-annotations:26.1.0’ which is part of the dependency lock state
Resolved ‘androidx.lifecycle:lifecycle-process:2.0.0’ which is not part of the dependency lock state
Did not resolve ‘android.arch.lifecycle:livedata-core:1.1.1’ which is part of the dependency lock state
Did not resolve ‘android.arch.lifecycle:common:1.1.1’ which is part of the dependency lock state
Did not resolve ‘com.android.support:support-fragment:26.1.0’ which is part of the dependency lock state
Resolved ‘androidx.lifecycle:lifecycle-extensions:2.0.0’ which is not part of the dependency lock state
Did not resolve ‘android.arch.core:common:1.1.1’ which is part of the dependency lock state

  • 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 27s
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    ]
    stdout[
    Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

Configure project :launcher

WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <6ba6f58d0f264bb59a4f0a6df92c605b>: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 <6ba6f58d0f264bb59a4f0a6df92c605b>: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 <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <6ba6f58d0f264bb59a4f0a6df92c605b>: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 <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <6ba6f58d0f264bb59a4f0a6df92c605b>: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 <4ce403b7cdf744109283ae55cdc24285>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

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

UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <4ce403b7cdf744109283ae55cdc24285>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <4ce403b7cdf744109283ae55cdc24285>:0
UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

My Build Settings

gradleTemplate.properties file before I tried to build

gradleTemplate.properties file after I tried to build

Thanks for your help!

Had the same issue, after adding
android.enableJetifier=true
android.useAndroidX=true
it worked, but only when set to Release build, Master doesn’t work which seems to be another issue.

However on iOS it now reports “‘UnityMediationSdk/UnityMediationSdk.h’ file not found”

So just as an info…

Any new information regarding this? I’m getting the exact same issue and adding android.enableJetifier=true and stuff to gradle properties does nothing. I heard something about there being an issue with Unity Mediation? I’m assuming reinstalling the entire Android SDK might be a valid solution right? Only thing I can think of

I simply switched to LevelPlay since Unity Mediation is deprecated. Now also iOS compiled for me.

1 Like

Is it worked???

I have the same problem. I tried the above solution, but the problem is not solved.

8676540--1169463--upload_2022-12-20_18-15-38.png

Hey everyone, if this error shows up for you as well, it looks like your dependency lock files need to be regenerated. Either delete the folder Assets/Editor/Platform-Dependencies or uncheck the box for Generate Deterministic Builds with Lock Files in Services/Unity Mediation/Configure/Build Settings. Another option is to check the box for Force Future Builds to Include the Newest Valid Native Dependencies. This will also regenerate the lock files.

Regarding the iOS issue mentioned above, this is a very generic umbrella issue already reported multiple times, please create a separate thread if non of the existing solutions in this forum work for you, also include all the versions of the tools you are using (cocoapods, Xcode, Editor, …) along with all the console logs (especially the Unity Editor console logs).

Let us know if that works. Thanks!

1 Like

I just tried everything you said(delete the folder Assets/Editor/Platform-Dependencies, uncheck the box for Generate Deterministic Builds with Lock Files in Services/Unity Mediation/Configure/Build Settings, check the box for Force Future Builds to Include the Newest Valid Native Dependencies), but got the same error as before .

(I tried in initial settings : Custom Main Gradle Template unchecked, Custom Gradle Properties Template unchecked)

And even the dependency lock file doesn’t seem to be regenerated(there is no Assets/Editor/Platform-Dependencies folder after removed and build).

Thanks for your help

(I’m just going to try using LevelPlay at another test project…)

I am able to build successfully with custom manifest check on , custom main Gradle template check on and custom Gradle properties template check on. But at run time I am getting this log: I checked my ad unit which is correct.
Help me to do that.

2022-11-30 14:20:36.011 11655 11655 Info logger Mediation SDK version: 1.1.0
2022-11-30 14:20:39.177 11655 12581 Info tracker register new receiver with filter com.digitalmedia.hunt.track.process
2022-11-30 14:20:41.800 11655 12462 Debug SharedPreferencesImpl Time required to fsync /data/user/0/com.water.mancalabestboardgame/shared_prefs/unity_mediation_data+privacy.xml: [<1: 0, <2: 0, <4: 0, <8: 0, <16: 0, <32: 0, <64: 0, <128: 0, <256: 0, <512: 1, <1024: 0, <2048: 0, <4096: 0, <8192: 0, <16384: 0, >=16384: 0]
2022-11-30 14:20:41.839 11655 12642 Info logger The Unity Mediation SDK has been initialized.
2022-11-30 14:20:43.691 11655 12837 Error logger com.unity3d.mediation.l0: Exception raised while retrieving the Ad Unit Configuration: com.unity3d.mediation.k0: Requested Ad Unit has incorrect format.

I have the same error message. However, Unity still manages to build when I ignore it and the app seems to work perfectly fine. But can I be sure that it is fine?

Another thing, is the Unity LevelPlay thing mentioned here legit? Are we supposed to to move to that? Why doesn’t the Unity website clearly tell us that.

1 Like

Unity Ads → Mediation → Level Play and all the documentation associated with these migrations are the most convoluted and confusing mess of documentation if have ever seen. Nothing is up to date. Documentation is spread across multiple websites and all tell you conflicting out of date information.

Inside unity itself it also tells you conflicting information. Unity Ads tells you to install the ads package even though it’s incompatible with mediation that is already installed.

Seriously bad.

From what i can tell, all of these are out of date and you should NOT use any of them
https://docs.unity.com/ads/en/UnityDeveloperIntegrations.html

Even though they are linked to on the Dashboard… nice 3 hour distraction, thanks unity. It even says ‘REQUIRED’ But it’s the old and soon to be unsupported version of Unity Ads.

And this is the most up to date but not quite current implementation of Ads for Unity. Which is acutally just IronSource confusingly named as Unity LevelPlay, you know because why would i implement IronSource when I’m trying to implement UnityAds (I know you merged but this is next level confusing naming of SDKs).

What’s the bet that in 6 months I’ll need to rip all this out and re-implement the same stuff again only with ‘IronSource’ replaced by ‘Unity’ in the code, oh and some other implementation details around caching and showing ad units that seems to change in ever version ever made.

I’m looking forward to that. (Sarc).

5 Likes

Yeah, it really might be the most convoluted mess I’ve seen working with Unity. I’ve given up half way through. Now I can’t even reinstall “advertisement with mediation” anymore as that this stillbirth was removed from the package manager. And I had moved to “advertisement with mediation” only at the beginning of this month. I’ve just wasted days with this shit. So I’ve gone back to using Unity Ads legacy. Since I only use Unity Ads for now I don’t see a need for mediation, so it’s not a big issue for me, but then again, they are stopping support for it so there is that. But I won’t migrate until they make the migration smooth. Why the f## isn’t there a simple full script with we can just copy and modify. I won’t touch it anymore, because I know that once I integrate it they’ll change things again. I’ll wait until they got their act together.

You know what is really crazy? Unity made the deal 5 months ago. You’d think they’d figured it out by now. From what I can tell, there is some super easy integration for Adobe Air, but not for Unity. They should work on integrating whatever they want with it into the Unity Editor, to make it smooth like the good old legacy unity ads.

1 Like

tried all stuff but in vain

also tried

This mess really need to be fixed @DeclanMcPartlin Package should work out of the box without each dev spending days trying to tweak their settings to the ideal scenario mediation package supports.

1 Like

Hey @unitydevelopers-greg ,
While I totally understand your (and other users) frustration, and I can admit the transition from Unity Mediation to LevelPlay could have been smoother (and I immensely appreciate you guys giving us feedback, as it helps inform us and the decision makers, so we can make our product better) making a one-size fits all package is unfortunately near impossible.
Mediation in itself is a complex domain. It relies on third party libraries from several different providers, that must play nice with one another, and the solution must ensure proper libraries compatibility between all the dependencies.
Add to that the fact that every user has a different application, and their own requirements, it becomes very tough to have a solution that works for everyone.
For example, our documentation encourages using a mainTemplate.gradle file, but some users may not be able to or want to, so we can’t simply force the setting, or even enable it without the user’s knowledge, because if we do, some users will have an easier time, while some will be more frustrated.
This is why our approach is to offer documentation and inform our users so they can make their own decision.

We hope LevelPlay will soon be fully integrated, and that as we receive more feedback from our users, we can provide more informations, and make informed decisions to make the product more convenient to use. In the meantime, please keep sharing your issues with us, as an issue we never hear about is an issue we can not address :slight_smile:

Hi all.
Have you found solution for the problem? I’va faced the same issue.
Errors:

Configure project :launcher
WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8

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

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:launcher:lintVitalRelease’.

This project uses AndroidX dependencies, but the ‘android.useAndroidX’ property is not enabled. Set this property to true in the gradle.properties file and retry.
The following AndroidX dependencies are detected: androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.core:core:1.2.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.2.0, androidx.startup:startup-runtime:1.0.0, androidx.tracing:tracing:1.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0

  • 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 953ms
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

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

CommandInvokationFailure: Gradle build failed.

Build completed with a result of ‘Failed’ in 38 seconds (38360 ms)

UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <36f62d8e760b48f7af5d32916f997ce1>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <36f62d8e760b48f7af5d32916f997ce1>:0
UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “assembleRelease”

stderr[

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:launcher:lintVitalRelease’.

This project uses AndroidX dependencies, but the ‘android.useAndroidX’ property is not enabled. Set this property to true in the gradle.properties file and retry.
The following AndroidX dependencies are detected: androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.core:core:1.2.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.2.0, androidx.startup:startup-runtime:1.0.0, androidx.tracing:tracing:1.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0

  • 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 953ms
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[

Configure project :launcher
WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
]
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 <c3a2c42a45424b88b29dfadf7f497cbb>: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 <36f62d8e760b48f7af5d32916f997ce1>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

Have you tried what the error message suggests?
This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.