유니티 오류가 복잡해 보이지만 해결 방법은
unity-plugin-library.jar 이 파일 찾아서 지워주면 됩니다.
추가로
\Assets\Plugins\Android\GoogleMobileAdsPlugin
\Assets\Plugins\Android\GoogleMobileAdsPlugin
폴더를
\Assets\Plugins\Android\GoogleMobileAdsPlugin.androidlib
이렇게 바꿔주면 됩니다.
\Assets\Plugins\Android\GoogleMobileAdsPlugin.androidlib
이렇게 바꿔주면 됩니다.
![](https://blog.kakaocdn.net/dn/cIP6ij/btsvJPM74NV/1ANZcIXK7gJP1xxQvHo7IK/img.jpg)
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.google.unity.ads.AdNetworkExtras found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
주요 오류 내용이라고 보시면 됩니다.
아래 콘솔에는 이렇게 표시가 됩니다.
--------------------------------------------------
Starting a Gradle Daemon, 1 incompatible and 4 stopped Daemons 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
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:compileReleaseAidl NO-SOURCE
> Task :launcher:generateReleaseBuildConfig
> Task :launcher:compileReleaseAidl NO-SOURCE
> Task :launcher:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:generateReleaseResValues
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:generateReleaseResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources
> Task :launcher:generateReleaseResValues
> Task :launcher:generateReleaseResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksRelease
> Task :launcher:createReleaseCompatibleScreenManifests
> Task :launcher:extractDeepLinksRelease
> Task :launcher:javaPreCompileRelease
> Task :launcher:prepareLintJar
> Task :unityLibrary:packageReleaseResources
> Task :unityLibrary:extractDeepLinksRelease
> Task :unityLibrary:compileReleaseLibraryResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest
> Task :unityLibrary:processReleaseManifest
> Task :unityLibrary:generateReleaseBuildConfig
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseLibraryResources
> Task :unityLibrary:javaPreCompileRelease
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseBuildConfig
> Task :unityLibrary:prepareLintJarForPublish
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJarForPublish
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources
> Task :unityLibrary:parseReleaseLocalResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile
> Task :unityLibrary:generateReleaseRFile
> Task :launcher:processReleaseManifest
> Task :launcher:checkReleaseDuplicateClasses FAILED
> Task :launcher:mergeReleaseResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac
30 actionable tasks: 30 executed
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.google.unity.ads.AdNetworkExtras found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$1 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$2 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$3 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$4 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$5 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$6 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$7 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Interstitial found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Interstitial$1 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Interstitial$1$1 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Interstitial$2 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Interstitial$3 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.PluginUtils found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.UnityAdListener found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Go to the documentation to learn how to Fix dependency resolution errors.
* 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 12s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
,
CommandInvokationFailure: Gradle build failed.
D:\unity\2020.3.24f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\unity\2020.3.24f1\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:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.google.unity.ads.AdNetworkExtras found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$1 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$2 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$3 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$4 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$5 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$6 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Banner$7 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Interstitial found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Interstitial$1 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Interstitial$1$1 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Interstitial$2 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.Interstitial$3 found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.PluginUtils found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Duplicate class com.google.unity.ads.UnityAdListener found in modules googlemobileads-unity-runtime.jar (:googlemobileads-unity:) and unity-plugin-library.jar (unity-plugin-library.jar)
Go to the documentation to learn how to Fix dependency resolution errors.
* 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 12s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
Starting a Gradle Daemon, 1 incompatible and 4 stopped Daemons 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
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:compileReleaseAidl NO-SOURCE
> Task :launcher:generateReleaseBuildConfig
> Task :launcher:compileReleaseAidl NO-SOURCE
> Task :launcher:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:generateReleaseResValues
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:generateReleaseResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources
> Task :launcher:generateReleaseResValues
> Task :launcher:generateReleaseResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:extractDeepLinksRelease
> Task :launcher:createReleaseCompatibleScreenManifests
> Task :launcher:extractDeepLinksRelease
> Task :launcher:javaPreCompileRelease
> Task :launcher:prepareLintJar
> Task :unityLibrary:packageReleaseResources
> Task :unityLibrary:extractDeepLinksRelease
> Task :unityLibrary:compileReleaseLibraryResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest
> Task :unityLibrary:processReleaseManifest
> Task :unityLibrary:generateReleaseBuildConfig
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseLibraryResources
> Task :unityLibrary:javaPreCompileRelease
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseBuildConfig
> Task :unityLibrary:prepareLintJarForPublish
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJarForPublish
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:parseReleaseLocalResources
> Task :unityLibrary:parseReleaseLocalResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile
> Task :unityLibrary:generateReleaseRFile
> Task :launcher:processReleaseManifest
> Task :launcher:checkReleaseDuplicateClasses FAILED
> Task :launcher:mergeReleaseResources
> Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseJavaWithJavac
30 actionable tasks: 30 executed
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <fc7be335e11c4872b360501993848bfb>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <fc7be335e11c4872b360501993848bfb>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <fc7be335e11c4872b360501993848bfb>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <fc7be335e11c4872b360501993848bfb>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <fc7be335e11c4872b360501993848bfb>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <fc7be335e11c4872b360501993848bfb>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <fc7be335e11c4872b360501993848bfb>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <fc7be335e11c4872b360501993848bfb>: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 <fc7be335e11c4872b360501993848bfb>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <fc7be335e11c4872b360501993848bfb>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <fc7be335e11c4872b360501993848bfb>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <fc7be335e11c4872b360501993848bfb>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, 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 <bbfbd5a71eea45d1a1354233c800516b>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
'유니티' 카테고리의 다른 글
유니티 라이선스 활성화 방법 No active licenses To create and open projects, you need an active license. (0) | 2024.02.02 |
---|---|
유니티 파이어베이스 푸시 연동 기본 (2) | 2023.09.29 |
원시그널 - 파이어베이스 앱 연동 설정 (0) | 2023.09.27 |
댓글