I downloaded and installed LevelPlay package
I setup all the ad networks
Added this to android manifest
Added this to mainTemplate.gradle android.enableDexingArtifactTransform=false
And now when i Reimport and click Assets>Mobile Dependency resolver>Android Resolver>Force Resolve it just stucks at 100% while it tries to Resolve Android Dependencies…
and after some time it displays error
Gradle failed to fetch dependencies.
I am Using Unity version 2022.2.14 And Trying to use IronSource Sdk 7.5.2.
Same here, happens on a fresh project as well. Simply adding the LevelPlay SDK with IronSource+Unity Ads+AdMob adapters and going for “force resolve” or “resolve” will go in an infinite loop trying to resolve the same dependencies over and over. Using Unity 2023.2.2 and LevelPlay SDK 7.5.2.
This is quite a blocker.
This IronSource Sdk 7.5.2 is Bugged is Not working for anyone, I was do able to do it Before with Older Version
. You can try it if it dosen’t work then I guess have to wait till they Fix it
Hey
We usually recommend to tick the custom Gradle MainTemplate setting in PlayerSetting for Android
https://github.com/googlesamples/unity-jar-resolver#integrate-into-maintemplategradle
By basically ticking the box in PlayerSettings called :
Custom Main Gradle Template
EDM4U will insert the dependencies into the Gradle files and let them resolve at build time rather than try resolving it during compilation of the Unity project and figuring out clashes."
Essentially this means going to Project Settings > Player > Publish Settings, and ensuring that the Custom Main Gradle Template checkbox is enabled, then going to Assets > MobileDependenciesResolver > Android Resolver and select Force Resolve.
Please try above to see if it works. PS: we are working on a permanent resolution.
Thanks for the fix, it works here
Which unity version are you using?
Hello, I tried what you suggested.
Android Dependencies Resolution was Success! but When I Build there is this Error.
Edit: I was able to Resolve and Build Successfully on Both 2021.3.18f1 and 2022.3.14f1 with default External Tools. ( IronSource SDK Version 7.6.0 ) Android Target API 33
On 2021.3.18f1:
1. Remove “Ironsource” and “ExterDependencyManager”.
2. ( C:\Program Files\UNITY\2021.3.18f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2 ) Go to This Location of your Editor and if you see “d8.bat” rename it to “dx.jar” , Also Over here there is “lib Folder” Now there exist both d8.jar and dx.jar so Just ignored them…
3.https://developers.is.com/ironsource-mobile/unity/unity-plugin/#step-1 Download ironsource SDK v7.6.0
4.Open Your Unity Project and in Menu Bar click on “Assets” -->“Import Package” → “Custom Package” then Browse and Select your “Downloaded ironsource SDK v7.6.0”.
5.In Menu Bar Click “Ads Mediation” then “Integration Manager” then update “UnityAds”.
6.In Menu Bar Click “Assets” , “Mobile Dependency Resolver” , “Android Resolver” ,“Forced Resolve”.(You might Get Win32 Error and we will Fix this Now).
7.Open “Project Settings” and inside “Player” tab go to Publishing Settings here Check the Following:
Custom Main Manifest ,
Custom Main Gradle Template ,
Custom Gradle Properties Template…
{ Note the Path under the Things you Checked }
8.Open mainTemplate.gradle from (Step 7) https://developers.is.com/ironsource-mobile/unity/unity-plugin/#step-4 ( Copy First line of Code you see in Step 4 of Website)
And Paste it above inside mainTemplate.gradle.
9.Open GradleTemplate.properties from (Step 7) and Add Following under
ADDITIONAL_PROPERTIES
android.useAndroidX=true
android.enableJetifier=true
android.enableDexingArtifactTransform=false
in Same file comment out this line like this:
//android.enableR8=MINIFY_WITH_R_EIGHT
10.In Menu Bar Click “Assets” , “Mobile Dependency Resolver” , “Android Resolver” ,“Forced Resolve” And it Should Resolve Successful and Build too.
For 2022.3.14f1
1. Download https://github.com/googlesamples/unity-jar-resolver Latest Resolver
2. Remove “Ironsource” and “ExterDependencyManager”.
3. Follow Step 3 to Step 10 As Mention Above
YouTube Tutorial on https://www.youtube.com/@mr_isometric_gamedev
I use Unity 2022.3.4f1.
Target API Level = Android 13.0 (API Level 33)
And in case that can help someone, I also have these files in “Assets\Plugins\Android”:
- mainTemplate.gradle:
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Resolver Dependencies Start
implementation 'com.google.ads.mediation:facebook:6.15.0.0' // Assets/GoogleMobileAds/Mediation/MetaAudienceNetwork/Editor/MetaAudienceNetworkMediationDependencies.xml:24
implementation 'com.google.ads.mediation:unity:4.8.0.0' // Assets/GoogleMobileAds/Mediation/UnityAds/Editor/UnityMediationDependencies.xml:25
implementation 'com.google.ads.mediation:vungle:6.12.1.1' // Assets/GoogleMobileAds/Mediation/LiftoffMonetize/Editor/LiftoffMonetizeMediationDependencies.xml:24
implementation 'com.google.android.gms:play-services-ads:22.3.0' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7
implementation 'com.google.android.play:core-common:2.0.0' // Assets/GooglePlayPlugins/com.google.play.core/Editor/Dependencies.xml:3
implementation 'com.google.android.play:review:2.0.0' // Assets/GooglePlayPlugins/com.google.play.review/Editor/Dependencies.xml:3
implementation 'com.google.android.ump:user-messaging-platform:2.1.0' // Assets/GoogleMobileAds/Editor/GoogleUmpDependencies.xml:7
implementation 'com.unity3d.ads:unity-ads:4.8.0' // Assets/GoogleMobileAds/Mediation/UnityAds/Editor/UnityMediationDependencies.xml:33
// Android Resolver Dependencies End
**DEPS**}
// Android Resolver Exclusions Start
android {
packagingOptions {
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/armeabi-v7a/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
exclude ('/lib/x86_64/*' + '*')
}
}
// Android Resolver Exclusions End
android {
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**
- gradleTemplate.properties:
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
**ADDITIONAL_PROPERTIES**
android.suppressUnsupportedCompileSdk=33
- settingsTemplate.gradle:
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**ARTIFACTORYREPOSITORY**
google()
mavenCentral()
// Android Resolver Repos Start
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url "https://maven.google.com/" // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7, Assets/GoogleMobileAds/Editor/GoogleUmpDependencies.xml:7
}
maven {
url "https://repo.maven.apache.org/maven2/" // Assets/GoogleMobileAds/Mediation/LiftoffMonetize/Editor/LiftoffMonetizeMediationDependencies.xml:24, Assets/GoogleMobileAds/Mediation/MetaAudienceNetwork/Editor/MetaAudienceNetworkMediationDependencies.xml:24, Assets/GoogleMobileAds/Mediation/UnityAds/Editor/UnityMediationDependencies.xml:25, Assets/GoogleMobileAds/Mediation/UnityAds/Editor/UnityMediationDependencies.xml:33
}
maven {
url "https://dl.google.com/dl/android/maven2/" // Assets/GoogleMobileAds/Mediation/LiftoffMonetize/Editor/LiftoffMonetizeMediationDependencies.xml:24, Assets/GoogleMobileAds/Mediation/MetaAudienceNetwork/Editor/MetaAudienceNetworkMediationDependencies.xml:24, Assets/GoogleMobileAds/Mediation/UnityAds/Editor/UnityMediationDependencies.xml:25
}
mavenLocal()
// Android Resolver Repos End
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
}
}
Hey, I am having problem building for android as well. When I try to resolve dependencies with External Dependency Managar, it goes to 100% but it goes in a loop and never resolves successfully. When I try to build for android, Unity is not responding during Importing (iteration 2) phase and doesn’t finish at all. I tried your suggestion but it gives me build failed error with no other information.
I am using unity 2021.3.11f1 and IronSource SDK 7.6.1
Android target API level 33
Maybe it’s worth mentioning that I updated my mac to Sonoma 14.2, but I don’t have any problems building on iOS
Any other suggestions?
I’m having this problem as well. Dependency resolution is stuck at 100% and Unity eats all available memory reaching 28GB allocated to the process in an hour. Outputting additional information to the log does not show any conflicts. I had to run the dependency resolution process manually from the console.
Eventually a dependency conflict was found in com.unity3d.ads:unity-ads:4.9.2 . Only a part of the whole log, which reaches 300MB in the attachment.
9543376–1347931–resolve.txt (1.92 MB)
You guys can remove both EDM and ironsource, then try sdk version 7.4.0. Version 7.5.2 's not work for me, and i didn’t try 7.6.0 yet.
When Unity is stuck at 100% (attempting again and again), it’s because of duplicated libraries that it can’t resolve. I use Applovin MAX but this applies to all other mediators too (for example Ironsource).
To resolve:
- first go to Settings/Player and enable ‘Custom Main Gradle Template’.
- Now go to Assets/External Dependencies Manager/Android Resolver/Delete Resolved Libraries. This should delete all libraries from your Plugin/Android folder of the project
- Go to Assets/External Dependencies Manager/Android Resolver/Force Resolve. If successful it will show a popup ‘Android Dependencies Resolution Succeeded’. This means that all the dependencies were added to the Custom Main Gradle Template we activated in step 1. (note: if the popup doesn’t show it means that it didn’t resolve. You could close and re-open unity, but an even faster fix is to enter quickly into playmode and stop again. Then Force Resolve again)
- Build
- If the build fails (due to duplicates like kotlin or media, etc.), delete all used adapters in the Applovin Integration Manager (trash bin icon)
- Then go again to Assets/External Dependencies Manager/Android/Force Resolve. This will update all the dependencies and remove all the adapters from the Custom Main Gradle Template (make sure each time the successful popup is shown, otherwise quickly enter playmode).
- Build again and if successful you know that the culprit is one (or several) of the adapters
- Now add them back one by one and with each addition check if your app still builds (need to force resolve after each). Once it fails you know that the recently added adapter is the culprit and needs to be excluded from your build.
In my case it was the latest unity ads + ironsource adapters.
- So next is to find a version of those adapters that still work (unless you just want to kick them out entirely). To do so, first re-add the latest version back as you normally would, using the Applovin Integration Manager.
- Now in the project folder navigate to Assets/MaxSdk/Mediation/‘BADNETWORK’/Editor and open the file ‘Dependencies’ in Visual Studio (or any other app). Change the version number of the Android Package to a previous version.
Like ironsource-adapter:7.5.2.0 instead of ironsource-adapter:7.6.0.0. Save the file.
You can check the version history on github for each adapter: GitHub - AppLovin/AppLovin-MAX-SDK-Android Click on the corresponding adapter and then click on history.
Note: If you use a different mediator, go to their corresponding github page instead.
- Force Resolve once more. This will add now the older dependencies to the Custom Main Gradle Template.
- Build
- If it still gives error, revert to an even older version and build again.
I use now ironsource-adapter:7.5.2.0.0 and unityads-adapter:4.8.0.0 and everything is working again.
Hope that helps.
Same. And in general, it is just “amazing” how these solutions with millions and billions of revenue so poorly documented and garbage-designed.
Does anyone try with ironsource 7.7.0? I am still stuck when trying Android Resolve.
In Unity 2021.3.29 with IronSource 7.7.0 stuck in 100%. Can you solve the problem? Or Others?
I having the same issue with Unity 2021.3.29f1 + ironsource 7.7, as long I’ve import Unity ads adapter, it start to 100% stucked at Android Resolve, it works resolved perfefctly fine without the Unity ads adapter
I checked in the the Levelplay SDK team this issue being re-prioritized with the Unity editor team. Although not universal solution, we can try a couple of workarounds until something permanent comes along:
-
Check the box to enable Main Template Gradle. Note: AdMob asks publishers to enable Main Gradle Template as well.
-
Remove Mobile Dependency Resolver and install EDM4U (Google’s open source dependency resolver, which we used to create MDR).
thanks a lot
This problem has been pounding my soul for seven hours, and my solution so far is your solution. This problem has been pounding my soul for seven hours, and my solution so far is your solution.
By the way, I’ll tell you how I handled this. My version of unity is 2022.3.14f
- Uninstall the Advertisement Legacy and Advertisement with Mediation
- Download ExternalDependencyManager For unity
- Import external-dependency-manager-1.2.178
- Import ironSource 7.7 No additional content will pop up to import at this time
- Enable the Custom Main Manifest
Copy the fields in the ironSource Guide
- Enable the Custom Main Gradle Template
- Enable the Custom Gradle Properties Template
Add the following
android.useAndroidX=true
android.enableJetifier=true
android.enableDexingArtifactTransform=false - Enable the Custom Gradle Settings Template
- Change the package name in unity’s packaging Settings to the official package name
- Add a user-defined signature
I have tried the first method, which is to check the box to enable the Custom Main Template Gradle, and it helped to resolve the Android dependencies successfully. However, I am not really sure if this truly means that Android dependencies have been resolved or just being ignored since Custom Main Template Gradle is enabled. I am asking this because based on what I know, enabling Custom Main Template Gradle means telling Unity to ignore Android Dependencies even if there is any conflict.
Same situation as me. Ironsource adapter seems okay, it’s when its combined with UnityAds adapter that it bug out.