Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug Error related to Levelplay Update:2 files found with path 'META-INF/kotlinx_coroutines_core.version'

Discussion in 'LevelPlay' started by DanielF1324, Sep 17, 2023.

  1. alliexpdx

    alliexpdx

    Joined:
    Jul 24, 2022
    Posts:
    5
    I started having this issue as soon as I upgraded my LevelPlay from 7.5.2 to 7.6.2 (using Unity 2022.3.14f1). Just checking those boxes fixed it for me as well.

    *It also fixed a separate problem with Unity Ads adapter 4.3.39.1 (would hang on forced resolution for hours and then fail), so I was using an older version 4.3.37 for Unity Ads instead, but this allowed me to move to the latest version.
     
  2. sudarshanT

    sudarshanT

    Joined:
    Nov 23, 2023
    Posts:
    4
    Thank you, this works for me.
    After adding packaging option in gradle, i got error of CommandInvokationFailure: Gradle build failed.
    With this i didn't get any gradle error
     
  3. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,135
    AllPlugins.jpg

    I tried these steps, but when I click "force resolve" it doesn't download anything (says resolution completed) but the Plugins/Android folder doesn't get any libraries downloaded and when building it complains in regards to the lack thereof
    CouldNotResolve.jpg
    unity 2023.1.9

    - I tried updating IronSource from the integration manager, but that just caused unity to crash every time I tried to open the project, so I decided to delete the ironsource folder and download the layesy unitypackage, but the link on the site is broken
    https://developers.is.com/ironsource-mobile/unity/ironsource-integration-manager-unity/#step-1
     
    Last edited: Jan 26, 2024
  4. AsifNaeem

    AsifNaeem

    Joined:
    Apr 12, 2016
    Posts:
    29
    Facing same issue. when using Meta (Facebook) adapter with Admob 8.5.1 on Unity 2022.3.10
     
  5. unity_4C5DBF04B51DC8ECFA98

    unity_4C5DBF04B51DC8ECFA98

    Joined:
    Jul 5, 2023
    Posts:
    1
    Hi Everyone I had the same issue and I resolved it by doing same...


     
  6. DeathPro

    DeathPro

    Joined:
    Jul 28, 2018
    Posts:
    93
    I got the same error when I updated the SDKs.

    Facebook Unity SDK -> 16.02
    FirebaseAnalytics SDK -> 11.8.1
    FirebaseCrashlytics SDK -> 11.8.1
    GameAnalytics SDK -> 7.9.0 (via UPM)

    Also, I updated the current latest External Dependency Manager via UPM.
    External Dependency Manager Unity -> 1.2.179 (via UPM)

    Unity -> 2022.3.16f1 LTS

    Here is my External Dependency Manager Unity (EDMU) Settings. You can access the settings from the Menu Toolbar. Assets->External Dependency Manager->Android Resolver->Settings

    AndroidResolverSettings.png

    Here are my Android settings in ProjectSettings->Player->Android.

    ProjectBuildSettings_Android.png

    You do not have to mark all of them. You may only need to mark "CustomMainGradleTemplate" and "CustomLauncherGradleTemplate". There will be two files generated under Assets->Plugins->Android. "mainTemplate.gradle" and "launcherTemplate.gradle".

    You will see some markdowns which Unity puts by default. For example: **PACKAGING_OPTIONS**

    You can replace this gradle code snippet by removing **PACKAGING_OPTIONS**.

    Code (CSharp):
    1.     packagingOptions {
    2.                resources.pickFirsts.add('META-INF/kotlinx_coroutines_core.version')
    3.         **PACKAGING_OPTIONS**}
    I used "resources.pickFirsts.add" because the Gradle Documentation says direct usage of "pickFirsts" is deprecated.

    Here is an example of my "mainTemplate.gradle". Remember this is just an example. You should not implement all of it unless you are using the same SDKs.

    Code (CSharp):
    1. apply plugin: 'com.android.library'
    2. **APPLY_PLUGINS**
    3.  
    4. dependencies {
    5.     implementation fileTree(dir: 'libs', include: ['*.jar'])
    6. // Android Resolver Dependencies Start
    7.     implementation 'com.android.support:appcompat-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    8.     implementation 'com.android.support:cardview-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    9.     implementation 'com.android.support:customtabs:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    10.     implementation 'com.android.support:support-v4:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    11.     implementation 'com.facebook.android:facebook-applinks:[16.0.1,17)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:6
    12.     implementation 'com.facebook.android:facebook-core:[16.0.1,17)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:5
    13.     implementation 'com.facebook.android:facebook-gamingservices:[16.0.1,17)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:9
    14.     implementation 'com.facebook.android:facebook-login:[16.0.1,17)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:7
    15.     implementation 'com.facebook.android:facebook-share:[16.0.1,17)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:8
    16.     implementation 'com.google.android.gms:play-services-appset:16.0.2' // Packages/com.gameanalytics.sdk/Editor/Android/Dependencies.xml:4
    17.     implementation 'com.google.android.gms:play-services-base:18.3.0' // Assets/Firebase/Editor/AppDependencies.xml:17
    18.     implementation 'com.google.android.instantapps:instantapps:1.1.0' // Packages/com.gameanalytics.sdk/Editor/Android/Dependencies.xml:3
    19.     implementation 'com.google.firebase:firebase-analytics:21.5.1' // Assets/Firebase/Editor/CrashlyticsDependencies.xml:15
    20.     implementation 'com.google.firebase:firebase-analytics-unity:11.8.1' // Assets/Firebase/Editor/AnalyticsDependencies.xml:18
    21.     implementation 'com.google.firebase:firebase-app-unity:11.8.1' // Assets/Firebase/Editor/AppDependencies.xml:22
    22.     implementation 'com.google.firebase:firebase-common:20.4.2' // Assets/Firebase/Editor/AppDependencies.xml:13
    23.     implementation 'com.google.firebase:firebase-crashlytics-ndk:18.6.2' // Assets/Firebase/Editor/CrashlyticsDependencies.xml:13
    24.     implementation 'com.google.firebase:firebase-crashlytics-unity:11.8.1' // Assets/Firebase/Editor/CrashlyticsDependencies.xml:20
    25.     implementation 'com.google.games:gpgs-plugin-support:0.11.01' // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
    26.     implementation 'com.parse.bolts:bolts-android:1.4.0' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:4
    27. // Android Resolver Dependencies End
    28. **DEPS**}
    29.  
    30. // Android Resolver Exclusions Start
    31. android {
    32.   packagingOptions {
    33.       exclude ('/lib/armeabi/*' + '*')
    34.       exclude ('/lib/mips/*' + '*')
    35.       exclude ('/lib/mips64/*' + '*')
    36.       exclude ('/lib/x86/*' + '*')
    37.       exclude ('/lib/x86_64/*' + '*')
    38.   }
    39. }
    40. // Android Resolver Exclusions End
    41. android {
    42.     ndkPath "**NDKPATH**"
    43.  
    44.     compileSdkVersion **APIVERSION**
    45.     buildToolsVersion '**BUILDTOOLS**'
    46.  
    47.     compileOptions {
    48.         sourceCompatibility JavaVersion.VERSION_11
    49.         targetCompatibility JavaVersion.VERSION_11
    50.     }
    51.  
    52.     defaultConfig {
    53.         minSdkVersion **MINSDKVERSION**
    54.         targetSdkVersion **TARGETSDKVERSION**
    55.         ndk {
    56.             abiFilters **ABIFILTERS**
    57.         }
    58.         versionCode **VERSIONCODE**
    59.         versionName '**VERSIONNAME**'
    60.         consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
    61.     }
    62.  
    63.     lintOptions {
    64.         abortOnError false
    65.     }
    66.  
    67.     aaptOptions {
    68.         noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
    69.         ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
    70.     }
    71.  
    72.     packagingOptions {
    73.                resources.pickFirsts.add('META-INF/kotlinx_coroutines_core.version')
    74.         **PACKAGING_OPTIONS**}
    75. }
    76. **IL_CPP_BUILD_SETUP**
    77. **SOURCE_BUILD_SETUP**
    78. **EXTERNAL_SOURCES**
    79.  
    Here is an example of my "launcherTemplate.gradle". Remember this is just an example. You should not implement all of it unless you are using the same SDKs.

    Code (CSharp):
    1. apply plugin: 'com.android.application'
    2.  
    3. dependencies {
    4.     implementation project(':unityLibrary')
    5.     }
    6.  
    7. android {
    8.     ndkPath "**NDKPATH**"
    9.  
    10.     compileSdkVersion **APIVERSION**
    11.     buildToolsVersion '**BUILDTOOLS**'
    12.  
    13.     compileOptions {
    14.         sourceCompatibility JavaVersion.VERSION_11
    15.         targetCompatibility JavaVersion.VERSION_11
    16.     }
    17.  
    18.     defaultConfig {
    19.         minSdkVersion **MINSDKVERSION**
    20.         targetSdkVersion **TARGETSDKVERSION**
    21.         applicationId '**APPLICATIONID**'
    22.         ndk {
    23.             abiFilters **ABIFILTERS**
    24.         }
    25.         versionCode **VERSIONCODE**
    26.         versionName '**VERSIONNAME**'
    27.     }
    28.  
    29.     aaptOptions {
    30.         noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
    31.         ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
    32.     }**SIGN**
    33.  
    34.     lintOptions {
    35.         abortOnError false
    36.     }
    37.  
    38.     buildTypes {
    39.         debug {
    40.             minifyEnabled **MINIFY_DEBUG**
    41.             proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
    42.             jniDebuggable true
    43.         }
    44.         release {
    45.             minifyEnabled **MINIFY_RELEASE**
    46.             proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
    47.         }
    48.     }
    49.  
    50.     packagingOptions {
    51.                resources.pickFirsts.add('META-INF/kotlinx_coroutines_core.version')
    52.         **PACKAGING_OPTIONS**}
    53.      
    54.         **PLAY_ASSET_PACKS****SPLITS**
    55. **BUILT_APK_LOCATION**
    56.     bundle {
    57.         language {
    58.             enableSplit = false
    59.         }
    60.         density {
    61.             enableSplit = false
    62.         }
    63.         abi {
    64.             enableSplit = true
    65.         }
    66.     }
    67. }**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**
    68.  
    After making gradle changes, you need to Resolve Android Libraries with EDMU.

    Also, I do not know if you are going to need this but here is my Minimum API Level and Target API Level.

    upload_2024-4-4_11-37-56.png
     
    Sergei_CHorseGames likes this.
  7. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,135
    Hi DeathPro and thanks for your hard work explaining it! I'm part of the way there-
    I updated unity to the latest 2022 LTS
    - did your steps in the above post and added the External Dependency Manager. From what I understood, the goal of all of this is to disable the MobileDependencyResolver without deleting it and instead substitute it with the External Dependency Manager?

    Plusins.jpg

    - how did you install the External Dependency Manager? Did you use openupm https://openupm.com/ ? Says on the site it was for unity 2019....
    - Should I delete the old MobileDependenciesResolver?

    thanks in advance!
     
  8. DeathPro

    DeathPro

    Joined:
    Jul 28, 2018
    Posts:
    93
    You can delete the old MobileDependenciesResolver. You should have only one External Dependency Manager in your project. Sometimes the SDK has included EDMU. Deselect that folder when you import the SDKs.

    I installed the EDMU with OpenUPM but I like to add it in manifest.json manually. OpenUPM - EDMUGitHub

    upload_2024-4-13_12-59-41.png
     
  9. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,135
    Thanks DeathPro! Also, should the resolved libraries appear in Plugins/Android? I'm at the stage where External Dependency Manager says "resolution succeeded" but there is nothing inside - are they now stored elsewhere or did something go wrong?
     
  10. DeathPro

    DeathPro

    Joined:
    Jul 28, 2018
    Posts:
    93
    Do not worry. Your resolved libraries are now recorded in "mainTemplate.gradle".

    For instance, my "mainTemplate.gradle" looks like this:

    Code (CSharp):
    1. apply plugin: 'com.android.library'
    2. **APPLY_PLUGINS**
    3.  
    4. dependencies {
    5.     implementation fileTree(dir: 'libs', include: ['*.jar'])
    6. // Android Resolver Dependencies Start
    7.     implementation 'com.android.support:appcompat-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    8.     implementation 'com.android.support:cardview-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    9.     implementation 'com.android.support:customtabs:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    10.     implementation 'com.android.support:support-v4:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    11.     implementation 'com.facebook.android:facebook-applinks:[16.0.1,17)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:6
    12.     implementation 'com.facebook.android:facebook-core:[16.0.1,17)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:5
    13.     implementation 'com.facebook.android:facebook-gamingservices:[16.0.1,17)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:9
    14.     implementation 'com.facebook.android:facebook-login:[16.0.1,17)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:7
    15.     implementation 'com.facebook.android:facebook-share:[16.0.1,17)' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:8
    16.     implementation 'com.google.android.gms:play-services-appset:16.0.2' // Packages/com.gameanalytics.sdk/Editor/Android/Dependencies.xml:4
    17.     implementation 'com.google.android.gms:play-services-base:18.3.0' // Assets/Firebase/Editor/AppDependencies.xml:17
    18.     implementation 'com.google.android.instantapps:instantapps:1.1.0' // Packages/com.gameanalytics.sdk/Editor/Android/Dependencies.xml:3
    19.     implementation 'com.google.firebase:firebase-analytics:21.5.1' // Assets/Firebase/Editor/CrashlyticsDependencies.xml:15
    20.     implementation 'com.google.firebase:firebase-analytics-unity:11.8.1' // Assets/Firebase/Editor/AnalyticsDependencies.xml:18
    21.     implementation 'com.google.firebase:firebase-app-unity:11.8.1' // Assets/Firebase/Editor/AppDependencies.xml:22
    22.     implementation 'com.google.firebase:firebase-common:20.4.2' // Assets/Firebase/Editor/AppDependencies.xml:13
    23.     implementation 'com.google.firebase:firebase-crashlytics-ndk:18.6.2' // Assets/Firebase/Editor/CrashlyticsDependencies.xml:13
    24.     implementation 'com.google.firebase:firebase-crashlytics-unity:11.8.1' // Assets/Firebase/Editor/CrashlyticsDependencies.xml:20
    25.     implementation 'com.google.games:gpgs-plugin-support:0.11.01' // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
    26.     implementation 'com.parse.bolts:bolts-android:1.4.0' // Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:4
    27. // Android Resolver Dependencies End
    28. **DEPS**}
    29.  
    30. // Android Resolver Exclusions Start
    31. android {
    32.   packagingOptions {
    33.       exclude ('/lib/armeabi/*' + '*')
    34.       exclude ('/lib/mips/*' + '*')
    35.       exclude ('/lib/mips64/*' + '*')
    36.       exclude ('/lib/x86/*' + '*')
    37.       exclude ('/lib/x86_64/*' + '*')
    38.   }
    39. }
    40. // Android Resolver Exclusions End
    41. android {
    42.     ndkPath "**NDKPATH**"
    43.  
    44.     compileSdkVersion **APIVERSION**
    45.     buildToolsVersion '**BUILDTOOLS**'
    46.  
    47.     compileOptions {
    48.         sourceCompatibility JavaVersion.VERSION_11
    49.         targetCompatibility JavaVersion.VERSION_11
    50.     }
    51.  
    52.     defaultConfig {
    53.         minSdkVersion **MINSDKVERSION**
    54.         targetSdkVersion **TARGETSDKVERSION**
    55.         ndk {
    56.             abiFilters **ABIFILTERS**
    57.         }
    58.         versionCode **VERSIONCODE**
    59.         versionName '**VERSIONNAME**'
    60.         consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
    61.     }
    62.  
    63.     lintOptions {
    64.         abortOnError false
    65.     }
    66.  
    67.     aaptOptions {
    68.         noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
    69.         ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
    70.     }
    71.  
    72.     packagingOptions {
    73.                resources.pickFirsts.add('META-INF/kotlinx_coroutines_core.version')
    74.         **PACKAGING_OPTIONS**}
    75. }
    76. **IL_CPP_BUILD_SETUP**
    77. **SOURCE_BUILD_SETUP**
    78. **EXTERNAL_SOURCES**
    79.  
     
  11. Eristen

    Eristen

    Joined:
    Jun 17, 2021
    Posts:
    23
    I fixed this error (and other errors) by using the Unity Plugin instead of the Ads Mediation package. For some reason the AdMob provider in the Ads Mediation package causes a lot of headaches (or perhaps it's the Mobile Dependency Resolver that is the issue, idk). Just go with the Unity Plugin path, it's all the same except less headaches.
     
  12. King-Bling

    King-Bling

    Joined:
    May 2, 2017
    Posts:
    33
    So the final resolution I came to is it is better to revert back to the earlier version of the adapter. In my case Unity Ads Adapter was giving me this issue, so I went from 4.3.44 to 4.3.42 which solved the issue. This also means Unity has messed up something when updating the adapters so its better to wait for a newer version of the adapter for the actual solution, until then only option is to go back one step and re-install the previous version of the adapter.