【Unity】AdMobビルドエラー対応( 2 files found with path ‘META-INF/kotlinx_coroutines_core.version’ from inputs)

  • URLをコピーしました!
目次

はじめに

AdMobのエラー対応です。以下のエラーが出てビルドできませんでした。メディエーションを使っていると発生するエラーのようです。

A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
2 files found with path ‘META-INF/kotlinx_coroutines_core.version’ from inputs:

– /Users/**/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/org.jetbrains.kotlinx.kotlinx-coroutines-core-jvm-1.7.1.jar

– /Users /**/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/org.jetbrains.kotlinx.kotlinx-coroutines-core-1.7.1.jar

  • Unity 2022.3.10
  • Google Mobile Ads Unity Plugin v 8.5.2

対処方法

公式の対応はまだ無いようなので(2023/10)取り急ぎの対応になります。

Project Settings>Player>Publishing Settingsの「Custom Launcher Gradle Template」にチェックを入れます。

新しく「launcherTemplate」ファイルができるのでVisual Studioなどで開いて下記を加えます。

packagingOptions { 
     exclude('META-INF/kotlinx_coroutines_core.version')
}
この位置に追記

 こちらを加えることでビルドが通りました。ご参考まで。

参考

Unity Forum
Bug - Error related to Levelplay Update:2 files found with path 'META-INF/kotlinx_coroutines_core.ve... Hello, I use unity levelplay for displaying my ads, I had created a unity game that used Ironsource and Unity Ads adapters and build and published it,...

この記事が気に入ったら
フォローしてね!

よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!
目次