При билде игры на андроид появляется ошибка
Failed to update Android SDK package list. See the console for details.
В консоле 4 ошибки
первая ошибка:
Exception in thread «main» java.lang.NoClassDefFoundError: com/google/common/collect/Multimap
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.(SdkManagerCliSettings.java:65)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:57)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Multimap
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 3 more
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
вторая ошибка:
CommandInvokationFailure: Failed to update Android SDK package list.
D:UnityI2020.3.17f1EditorDataPlaybackEnginesAndroidPlayerSDKtoolsbinsdkmanager.bat —list
stderr[
Exception in thread «main» java.lang.NoClassDefFoundError: com/google/common/collect/Multimap
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.(SdkManagerCliSettings.java:65)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:57)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Multimap
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 3 more
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
]
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.AndroidSDKTools.RunAndroidSdkTool (System.String toolName, System.String arguments, System.Boolean updateCommand, System.String errorMsg, System.String toolsDir, System.String[] warningsToIgnore) (at :0)
UnityEditor.Android.AndroidSDKTools.ListComponentsVersions () (at :0)
UnityEditor.Android.SDKManager.UpdatePackagesList () (at :0)
UnityEditor.Android.SDKManager.HighestVersionInstalled (UnityEditor.Android.SDKManager+Component tool) (at :0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKToolsDetector.GetVersion () (at :0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector.Detect (System.Version minVersion, UnityEditor.Android.PostProcessor.ProgressHandler onProgress) (at :0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.EnsureSDKComponentVersion (System.Version minVersion, UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector detector) (at :0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
третья ошибка:
Build completed with a result of ‘Failed’ in 59 seconds (58609 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
четвертая ошибка:
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in :0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Я уже 5 раз переустановил Unity, что делать?
(Может это не поможет, но при начале установки во всех 5 попытках была ошибка по типу — не удалось удалить старые версии Android Build)
Building a project that worked fine in Unity 2019.4 now causes the following error in Unity 2020.3:
2021/08/27 14:32:24.237 5315 5338 Error Unity AndroidJavaException: java.lang.SecurityException: Not allowed to bind to service Intent { act=com.android.vending.licensing.ILicensingService pkg=com.android.vending }
2021/08/27 14:32:24.237 5315 5338 Error Unity java.lang.SecurityException: Not allowed to bind to service Intent { act=com.android.vending.licensing.ILicensingService pkg=com.android.vending }
2021/08/27 14:32:24.237 5315 5338 Error Unity at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1838)
2021/08/27 14:32:24.237 5315 5338 Error Unity at android.app.ContextImpl.bindService(ContextImpl.java:1749)
2021/08/27 14:32:24.237 5315 5338 Error Unity at android.content.ContextWrapper.bindService(ContextWrapper.java:756)
2021/08/27 14:32:24.237 5315 5338 Error Unity at com.unity3d.plugin.lvl.ServiceBinder.create(ServiceBinder.java:32)
2021/08/27 14:32:24.237 5315 5338 Error Unity at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
2021/08/27 14:32:24.237 5315 5338 Error Unity at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
2021/08/27 14:32:24.237 5315 5338 Error Unity at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
2021/08/27 14:32:24.237 5315 5338 Error Unity at android.os.Handler.dispatchMessage(Handler.java:102)
2021/08/27 14:32:24.237 5315 5338 Error Unity at android.os.Looper.loop(Looper.java:223)
2021/08/27 14:32:24.237 5315 5338 Error Unity at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
2021/08/27 14:32:24.237 5315 5338 Error Unity at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000
Apparently I’m not the only one getting this error:
https://forum.unity.com/threads/google-play-pass-licencing-check-no-longer-working.1122247/
Any ideas about why this is happening and how to fix it?
I was also experiencing this issue in Unity 2021.1, and found that Unity was no longer correctly merging the Android manifest, so the permission for license verification was not being added to the built Android Manifest. I worked around the issue by taking Unity’s generated manifest from the <project>TempStagingAreaUnityManifest.xml
, copying it to <project>AssetsPluginsAndroidManifest.xml
, and then adding the permission <uses-permission android:name="com.android.vending.CHECK_LICENSE" />
Awesome! Directly adding <uses-permission android:name="com.android.vending.CHECK_LICENSE" />
to <project>AssetsPluginsAndroidAndroidManifest.xml
worked for me. Thanks @DukeOfDelmar!
For future readers, here’s what I discovered.
Starting from Unity 2020 there is a fundamental change needed for a plugin folder to be considered an Android library: the folder name must end with «.androidlib» otherwise Unity won’t use/merge the AndroidManifest included in the folder.
Here’s the Unity 2020.3 documentation: https://docs.unity3d.com/2020.3/Documentation/Manual/AndroidAARPlugins.html , in the «Android Library Projects» paragraph there’s this very important change (you can check the 2019.4 documentation to see that it has been changed).
So for example «GooglePlayLicensing» must be renamed to «GooglePlayLicensing.androidlib» and then the included AndroidManifest will me merged in the build. Without that, it simply won’t be merged/included.
@Tanek81 said:
So for example «GooglePlayLicensing» must be renamed to «GooglePlayLicensing.androidlib» and then the included AndroidManifest will me merged in the build. Without that, it simply won’t be merged/included.
Hi, @Tanek81. I finally got around to testing this and unfortunately simply changing «GooglePlayLicensing» to «GooglePlayLicensing.androidlib» does not seem to work. I think you’re on the right track about needing to add «.androidlib» to the end of the folder name. But it seem the current project folder structure does not match the folder scheme required by Unity for Android Libraries. After I change the folder name and run my app the app is unable to find the jar file and errors out. For now going back to just adding the uses-permission line directly to the AndroidManifest file works fine but it would be nice if someone who knows how the folders should be structured makes the necessary change so the plugin will continue to work on upcoming versions of Unity out of the box…
Hi @sph0001 , I am sorry but I can’t help you, we had so many issues on Android with Unity 2020.3 that we reverted to Unity 2019.4.
For what I recall, the change I did fixed the issue with this plugin, but I don’t know if now there is more to do, maybe Unity implemented some more changes in their latest 2020.3 build?
I agree with you in saying that this of course should work out of the box with the latest Unity versions
@KirillKuzyk please stop spamming.
@Over17
I’m sorry for that. My intention wasn’t to spam, but to provide value for other developers. Telling people about my product here is the perfect place for people to know about it.
Yes, it’s a sort of advertisement, but my plugin solves many unaddressed issues that this repo has. Less work for you for maintaining this repo, more happy developers. Win-win for everyone as I see it.
Всё, победил! Спасибо большое за поддержку!
— Загрузился на Комариное без проблем, допрыгал по локациям до Ладоги и опять Unity error.
— Прошелся по пунктам, указанным выше, дошёл до пункта 6 — проверки целостности файлов игры, 1 файл подгрузился и всё заработало.
Играю через Steam, опция проверки файлов никогда не обозначалась, да и таких проблем не было, поэтому этот момент пришлось нарыть в свойствах Игры в Библиотеке Стима (пункт «Локальные файлы»). Ещё бы узнать, что это был за файл 🙂
Искренне рад, что это не проблема Игры. Спасибо, ребята, и удачи!
Спойлер
Изменено 16 ноября 2021 пользователем Максимус
Исправление стиля.
If you are also experiencing Unity 2020 crash/close when trying to make it work with SteamVR like me, the solutions could be here.
First Short Solution:
Upgrade your Unity version to Unity 2020.1.17 or the latest release, you are prompted to create actions file and everything works very well 🙂
Longer Path, Try to solve it with current version:
I was trying to make SteamVR work with Unity 2020.1.6. With no error, when I press play, the editor closes down with no error message. This wasn’t helpful to solve the case so cue Google search, “unity closes when I hiit play”, (yes with the typo).
This answer on StackOverflow lead me to LogFiles page on Unity Docs. As it was stated in the answer I went and looked at Editor logs from “C:UsersusernameAppDataLocalUnityEditorEditor.log” path and there at the last line I saw the error;
In 2019 version of the editor when we enter play mode with no actions for SteamVR Input, we are prompted and create one and if we opt out in creating one we see an error in the console
To solve this in 2020.1.6 we need to follow Window -> SteamVR Input -> Save and generate (Only the screenshot taken in 2020.1.17, for details have a look at first shorter solution)
Then our project will be good to go 🙂
Hopefully, this will be helpful for your problem too. If there was a point not clear please let me know.
See you in the next explorations.
To how to setup SteamVR in Unity 2019 you can have a look at this blog post or the video that I have created.
Опубликовано 2021-10-23
Гиды
2021-10-23
Очень странная ошибка, приводящая к сбою Humankind еще до того, как игра загрузится. Эта проблема, которая часто отображается как ошибка Unity 2020.3.7f1_dd97f2c94397 и появляется на экране загрузки, не позволяет игрокам получить доступ к игре. Как вы, возможно, догадались, это очень специфический вид сбоя, но, к счастью, он также имеет очень специфическое исправление.
Ошибка Humankind Unity Unity, которая приводит к сбою на экране загрузки, в основном затрагивает участников предыдущих бета-версий OpenDev. Если вы принимали участие в OpenDev, вам нужно удалить старые файлы профиля. В противном случае Humankind может дать сбой из-за другого стороннего программного обеспечения.
Судя по сообщениям пользователей на форумах Steam, одной из основных причин этой ошибки являются журналы профиля, хранящиеся из OpenDev. Они находятся в папке Humankind в папке «Мои документы». Если вы видите там папку, удалите ее. После этого снова запустите Humankind, и ошибка Unity 2020.3.7f1_dd97f2c94397 должна исчезнуть.
Если это не решит проблему или если вы ранее не были участником OpenDev, вам может потребоваться выборочно отключить некоторые программное обеспечение. В отчетах пользователей указано, что программное обеспечение Logitech RGB, а также программное обеспечение Realtek могут не работать с Humankind. Возможно, эти программы могут нарушить работу Unity. Если возможно, отключите все ненужное программное обеспечение, а затем попробуйте запустить игру, чтобы увидеть, исчезнет ли ошибка.
Кроме того, всегда рекомендуется проверять актуальность драйверов и операционной системы. Старые драйверы и программное обеспечение могут быстро вызвать проблемы с недавно обновленными играми, поэтому старайтесь обновлять все свои программы. Устаревшее программное обеспечение — одна из основных причинза кодами ошибок для огромного количества современных игр.
В большинстве случаев ошибка Humankind Unity 2020.3.7f1_dd97f2c94397 вызвана оставшимися файлами OpenDev. Удалите папку Humankind в Мои документы, чтобы предотвратить сбой Unity на экране загрузки. В противном случае исправление может включать отключение дополнительного программного обеспечения для управления системой, которое может нарушить работу Unity.
Захожу в Unity 2020.3.11f1, а там просто из ничего (в проекте до этого не было вообще ошибок) появляется две ошибки:
Microsoft (R) Visual C# Compiler version 3.5.0-dev-20359-01 (8da8ba0c)
Copyright (C) Microsoft Corporation. All rights reserved.
error CS2011: Error opening response file ‘C:Usersмои файлыWSFPSTemp/UnityTempFile-8fdb67041ad3d7c4696961b991bace2d’
warning CS2008: No source files specified.
error CS1562: Outputs without source must have the /out option specified
Microsoft (R) Visual C# Compiler version 3.5.0-dev-20359-01 (8da8ba0c)
Copyright (C) Microsoft Corporation. All rights reserved.
error CS2011: Error opening response file ‘C:Usersмои файлыWSFPSTemp/UnityTempFile-13197fa646014954fae4618657e87937’
warning CS2008: No source files specified.
error CS1562: Outputs without source must have the /out option specified
Что делать и как решить? Юнити перестановил, Visual Studio тоже.
__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь
I am still completely stuck on this… everything worked fine on the last version of unity 2019 now ti is totally broken and I cannot do a build i get these errors, any help would be appreciated…I tried installing and uninstall the unity module, no effect… I cannot go back to the old as it won’t open!!!:
ArgumentNullException: Value cannot be null.
Parameter name: path1
System.IO.Path.Combine (System.String path1, System.String path2) (at <fb001e01371b4adca20013e0ac763896>:0)
UnityEditor.Utils.Paths.Combine (System.String[] components) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Utils/Paths.cs:29)
UnityEditor.Android.AndroidGradleRoot.GetGradleLaunchJarPath (System.String directory) (at <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.Android.GradleWrapper.GetBaseCommand (System.Int32 jvmHeapSize) (at <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5f8140421e7d41ada100b629c3033aa7>: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 <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <5f8140421e7d41ada100b629c3033aa7>: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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:324)
Then this one:
Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
this one:
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00270] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:187
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)