Jump to content
Unity Insider Forum

tobias583

Members
  • Posts

    9
  • Joined

  • Last visited

tobias583's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. Ich habe folgendes Problem. Ich habe ein Leeres Unityprojekt oder ein oder eins mit UI getestet zur einer Android app zu exportieren. Dabei tretten folgende Fehler auf: 1: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. C:/Users/User/AppData/Local/Android/sdk\tools\bin\avdmanager.bat list target -c stderr[ Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156) at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75) at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81) at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213) at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 5 more ] stdout[ ] exit code: 1 UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.RunAndroidSdkTool (System.String toolName, System.String arguments, Boolean updateCommand, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.ListTargetPlatforms (UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit) UnityEditor.Android.AndroidSDKTools.GetTopAndroidPlatformAvailable (UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit) UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKPlatformDetector.GetVersion (UnityEditor.Android.AndroidSDKTools sdkTools) UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector.Detect (UnityEditor.Android.AndroidSDKTools sdkTools, System.Version minVersion, UnityEditor.Android.PostProcessor.ProgressHandler onProgress) UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.EnsureSDKComponentVersion (System.Version minVersion, UnityEditor.Android.PostProcessor.Tasks.SDKComponentDetector detector) UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.EnsureSDKComponentVersion (Int32 minVersion, UnityEditor.Android.PostProcessor.Tasks.SDKComponentDetector detector) UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) 2: Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. C:/Users/User/AppData/Local/Android/sdk\tools\bin\avdmanager.bat list target -c stderr[ Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156) at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75) at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81) at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213) at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 5 more ] stdout[ ] exit code: 1 3: Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) 4: UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181 at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) Programme: Unity 2017.3.1p1 Java jdk-9 Java jre-9 Android Studio 2.3.3 Android SDK Tools 26.1.1 Wie könnte ich nun die Fehler beheben? Danke im voraus
  2. Hallo ich bin gerade dabei ein Spiel zu programmieren dabei möchte ich gerne Objekte per Code erstellen. Dabei habe ich diesen Code angewendet public void SetCurrentBuildingLoad (GameObject building){ Gebaeude_plaziertload = PlayerPrefs.GetInt ("Gebaeude_plaziert"); for (int i = 0; i < Gebaeude_plaziertload; i++) { x = PlayerPrefs.GetFloat ("x" + Gebaeude_gen.ToString ()); y = PlayerPrefs.GetFloat ("y" + Gebaeude_gen.ToString ()); z = PlayerPrefs.GetFloat ("z" + Gebaeude_gen.ToString ()); currentBuilding = ((GameObject) Instantiate (building)).transform; currentBuilding.position = new Vector3 (x, y, z); currentBuilding = null; x = 0; y = 0; z = 0; } Aber sobald ich die Funktion ausführe erstellt zwar Unity die gewünschte Anzahl an Objekten in der Hierarchy aber ich sehe nur eins jetzt ist die Frage was ist Falsch. Ich habe 2 Vermutungen: Die 1 wäre das Unity alle Objekte an der gleichen stelle erstellt. Die 2 wäre das Unity das erste Objekt sichtbar macht aber die anderen nicht. Könnte mir dabei vielleicht jemand helfen?
×
×
  • Create New...