Unable to list target platforms please make sure the android sdk unity

Ошибка компиляции под Android на Unity. Как решить?

При компиляции под Android выдает сообщение и ошибки:

«Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details»

Пути SDK и JDK прописаны. Пробовал использовать более старые версии. В SDK менеджере сносил последние библиотеки инструментов и ставил более старые. Может кто сталкивался с подобной проблемой? Буду благодарен за помощь.

Error:Invalid command android

CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:/Program Files/Java/jdk1.8.0_91\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=»D:\Android\SDK\tools» -Dfile.encoding=UTF8 -jar «D:\Uniti3D\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar» —

stderr[
Error:Invalid command android
]
stdout[

]
exit code: 64
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()

Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:/Program Files/Java/jdk1.8.0_91\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=»D:\Android\SDK\tools» -Dfile.encoding=UTF8 -jar «D:\Uniti3D\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar» —

stderr[
Error:Invalid command android
]
stdout[

Источник

Unable to list target platforms. Please make sure the android sdk path is correct.

Phenomenon

When using Unity to compile app of Android platform, encountered this problem:

Detailed error description is as follows:

Error:Invalid command android
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:\Program Files\Java\jdk1.8.0_91\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=»D:/Android/sdk\tools» -Dfile.encoding=UTF8 -jar «D:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar» —

Читайте также:  Flash player standalone android

stderr[
Error:Invalid command android
]
stdout[

]
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

Reason

Unity at compile time will call the android command of Android SDK tools, and in the new version of the Android SDK tools, android command has been abandoned, resulting in Unity can not compile properly. My Android SDK tools version is 25.3.1.

My Android SDK configuration has no problem.

Later, I noticed that there was an error with the description «invalid command android», so I tried to run android command directly to see if there is a problem.

android command is android.bat under tools directory of AndroidSDK. Direct run, found that this command has been abandoned.

The «android» command is no longer available.
For manual SDK and AVD management, please use Android Studio.
For command-line tools, use
tools\bin\sdkmanager.bat and tools\bin\avdmanager.bat

Solution

Knowing the reason, the problem can be solved easily.

  1. Download an old version Android SDK tools from the official website. tools_r25.2.3-windows.zip.
  2. Backup the original tools under SDK directory. I renamed it to tools-25.3.1.
  3. unzip the old version tools to the SDK directory.
  4. Re-compile in Unity, the problem has been solved.

Comparing these two versions of tools, big difference, many things gone. For example, draw9patch for .9 image do not know where to go.

Posted by windyzhang in Android at Apr 28, 2017 — 11:20 AM Tag: Unity Android SDK

Источник

В консоль выводит данные ошибки

Скажите пожалуйста, о чем эти ошибки говорят и как решить проблему с их появлением?

Читайте также:  Have 2 whatsapp on android

1)
CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:/Program Files/Java/jdk-10\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=»C:/Users/User/AppData/Local/Android/Sdk\tools» -Dfile.encoding=UTF8 -jar «D:\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar» —

stderr[
Error:Invalid command android
]
stdout[

]
exit code: 64
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()

2)
CommandInvokationFailure: Failed to re-package resources.
C:\Users\User\AppData\Local\Android\android-sdk\build-tools\23.0.1\aapt.exe package —auto-add-overlay -v -f -m -J «gen» -M «AndroidManifest.xml» -S «res» -I «C:/Users/User/AppData/Local/Android/android-sdk\platforms\android-23\android.jar» -F bin/resources.ap_

stderr[
AndroidManifest.xml:5: error: Error: String types not allowed (at ‘configChanges’ with value ‘mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigati on|orientation|screenLayout|uiMode|screenSize|smallestScreen Size|fontScale|layoutDirection|density’).

]
stdout[
Configurations:
(default)
v14
v21
mdpi-v4
xhdpi-v4

Источник

Unable to list target platforms. Please make sure the android sdk path is correct.

Phenomenon

When using Unity to compile app of Android platform, encountered this problem:

Detailed error description is as follows:

Error:Invalid command android
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:\Program Files\Java\jdk1.8.0_91\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=»D:/Android/sdk\tools» -Dfile.encoding=UTF8 -jar «D:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar» —

stderr[
Error:Invalid command android
]
stdout[

]
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

Reason

Unity at compile time will call the android command of Android SDK tools, and in the new version of the Android SDK tools, android command has been abandoned, resulting in Unity can not compile properly. My Android SDK tools version is 25.3.1.

My Android SDK configuration has no problem.

Later, I noticed that there was an error with the description «invalid command android», so I tried to run android command directly to see if there is a problem.

Читайте также:  Рейтинг видеопроигрывателей для андроид

android command is android.bat under tools directory of AndroidSDK. Direct run, found that this command has been abandoned.

The «android» command is no longer available.
For manual SDK and AVD management, please use Android Studio.
For command-line tools, use
tools\bin\sdkmanager.bat and tools\bin\avdmanager.bat

Solution

Knowing the reason, the problem can be solved easily.

  1. Download an old version Android SDK tools from the official website. tools_r25.2.3-windows.zip.
  2. Backup the original tools under SDK directory. I renamed it to tools-25.3.1.
  3. unzip the old version tools to the SDK directory.
  4. Re-compile in Unity, the problem has been solved.

Comparing these two versions of tools, big difference, many things gone. For example, draw9patch for .9 image do not know where to go.

Posted by windyzhang in Android at Apr 28, 2017 — 11:20 AM Tag: Unity Android SDK

Источник

Unity3D не работает android sdk при сборке проекта. Выдаёт 3 ошибка в консоли —

Error:Invalid command android

UnityEditor.HostView:OnGUI()
—————————————————————————————————————————————
CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:/Program Files/Java/jdk1.8.0_162\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=»C:/Users/Andru/AppData/Local/Android/Sdk\tools» -Dfile.encoding=UTF8 -jar «C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar» —

stderr[
Error:Invalid command android
]
stdout[

]
exit code: 64
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()
—————————————————————————————————————————
Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
C:/Program Files/Java/jdk1.8.0_162\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir=»C:/Users/Andru/AppData/Local/Android/Sdk\tools» -Dfile.encoding=UTF8 -jar «C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar» —

stderr[
Error:Invalid command android
]
stdout[

Источник

Оцените статью