олег TV Ответов: 1

1 исключение было вызвано рабочими: подробности см. в консоли.


Hi, I work in Unity 2018.4.16f1 (64-bit). Today I had to build my project in Grudle, but there is a problem. Help me as soon as possible. Please do not write much, but to understand, you can write a solution step by step.



1 exception was raised by workers: See the Console for details.



CommandInvokationFailure: Gradle build failed. D:\Новая папка\2018.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "D:\Новая папка\2018.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"

stderr[

FAILURE: Build failed with an exception.

1 exception was raised by workers:

java.lang.RuntimeException: Duplicate class com.unity3d.ads.BuildConfig found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.IUnityAdsListener found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.UnityAds found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.UnityAds$FinishState found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.UnityAds$PlacementState found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.UnityAds$UnityAdsError found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.mediation.IUnityAdsExtendedListener found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.metadata.InAppPurchaseMetaData found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.metadata.MediationMetaData found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.metadata.MetaData found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.metadata.PlayerMetaData found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) 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 3m 29s ] stdout[

Configure project :

WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported. The current default is 'true'. Observed package id 'build-tools;26.0.0-rc2' in inconsistent location 'D:\SDK\SDK\build-tools\26.0.0-preview' (Expected 'D:\SDK\SDK\build-tools\26.0.0-rc2')
Task :preBuild UP-TO-DATE Task :preReleaseBuild Task :compileReleaseRenderscript NO-SOURCE Task :generateReleaseResValues Task :generateReleaseResources Task :mergeReleaseResources Task :checkReleaseManifest Task :createReleaseCompatibleScreenManifests Task :mainApkListPersistenceRelease Task :processReleaseManifest Task :bundleReleaseResources Task :mergeReleaseShaders Task :compileReleaseShaders Task :generateReleaseAssets Task :mergeReleaseAssets Task :checkReleaseDuplicateClasses FAILED

12 actionable tasks: 12 executed ] 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.Action`1[T] progress, System.String error) (at :0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at :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 :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.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 :0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:288) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179) 





Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e) Copyright (C) Microsoft Corporation. All rights reserved.


Что я уже пробовал:

Before I tried changing the settings and downloaded JDK 8.

1 Ответов

Рейтинг:
2

Richard MacCutchan

java.lang.RuntimeException: Duplicate class com.unity3d.ads.BuildConfig found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.IUnityAdsListener found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:) Duplicate class com.unity3d.ads.UnityAds found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
...

Похоже, что у вас есть две установки единства каким-то образом.


олег TV

У меня есть 2 версии Unity. Могу ли я удалить один из них?

Richard MacCutchan

Вопрос скорее в том, "какой из них я могу удалить?". Однако это не гарантирует, что все проблемы будут решены. Вам нужно понять, какая версия является правильной, и очистить все файлы, которые не являются частью этого пакета.

олег TV

Я удалил, как вы сказали, но получил еще одну ошибку.



Failed running D:\Новая папка\2018.4.16f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="D:\STOP\Projects\Zendy the great\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="D:\STOP\Projects\Zendy the great\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="D:\Новая папка\2018.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="D:\Новая папка\2018.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="D:/NDK/android-ndk-r16b" --map-file-parser="D:\Новая папка\2018.4.16f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="D:\STOP\Projects\Zendy the great\Temp\StagingArea\assets\bin\Data\Managed" --generatedcppdir="D:\STOP\Projects\Zendy the great\Temp\StagingArea\Il2Cpp\il2cppOutput"

стандартный вывод:
Здание libil2cpp.so с AndroidToolChain
Выходной каталог: D:\STOP\Projects\Zendy the great\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
Каталог кэша: D:\STOP\Projects\Zendy великая\библиотека\il2cpp_android_armeabi-v7a\il2cpp_cache
Объектные файлы: 561 из которых скомпилированы: 0
Общее время компиляции: 10177 миллисекунд.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: D:\NDK\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\user\AppData\Local\Temp\tmp59F4.tmp" -o "D:\STOP\Projects\Zendy the great\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_06243A2EA8FAC91C985A4C42CDE1B780\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "D:\NDK\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "D:\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "D:\NDK\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

D:\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld.gold.exe: фатальная ошибка: D:\STOP\Projects\Zendy тот самый great\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_06243A2EA8FAC91C985A4C42CDE1B780\libil2cpp.so: mmap: не удалось выделить 130177368 байт для выходного файла: недостаточно места
clang++.exe: ошибка: команда компоновщика не удалась с кодом выхода 1 (Используйте-v, чтобы увидеть вызов)


� Единство.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
� Единство.IL2CPP.Building.CppProgramBuilder.Сборка(IBuildStatistics& statistics)
� il2cpp.программа.DoRun(String[] args)
� il2cpp.Программы.Запустить(string[] аргументы)
� il2cpp.Программы.Главный(строка[] аргументы)
stderr:

����ࠡ�⠭��� �᪫�祭��: Unity.IL2CPP.Building.BuilderFailedException: D:\NDK\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\user\AppData\Local\Temp\tmp59F4.tmp" -o "D:\STOP\Projects\Zendy the great\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_06243A2EA8FAC91C985A4C42CDE1B780\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "D:\NDK\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "D:\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "D:\NDK\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

D:\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64/lib/gcc/arm-linux-androideabi/4

Richard MacCutchan

Извините, но у меня больше нет идей. Я предлагаю вам найти форум, посвященный единству, поскольку именно там, по-видимому, лежат ваши проблемы. В качестве альтернативы вы можете очистить всю систему от пакетов Unity и начать все сначала.

олег TV

Спасибо.