Hi. I got the error “Unable to list target platforms” whenever I try to build app for android in ubuntu 14.04
Error building Player:CommandInvokationFailure:Unable to list target platforms.Please make sure the android sdk path is correct.See the Consolefor more details./usr/lib/jvm/java-8-oracle/bin/java -Xmx2048M-Dcom.android.sdkmanager.toolsdir=“/home/yeol/AndroidSDK/tools”-Dfile.encoding=UTF8 -jar “/opt/Unity/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar”-
stderr[Exception in thread “main” java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at SDKMain.main(SDKMain.java:129)Caused by: java.lang.NoSuchMethodError: com.android.sdklib.ISystemImage.getTag()Lcom/android/sdklib/repository/descriptors/IdDisplay;
at com.android.sdklib.SystemImage.compareTo(SystemImage.java:278)
at com.android.sdklib.SystemImage.compareTo(SystemImage.java:37)
at java.util.TreeMap.compare(TreeMap.java:1294)
at java.util.TreeMap.put(TreeMap.java:538)
at java.util.TreeSet.add(TreeSet.java:255)
at com.android.sdklib.repository.local.LocalPlatformPkgInfo.getPlatformSystemImages(LocalPlatformPkgInfo.java:362)
at com.android.sdklib.repository.local.LocalPlatformPkgInfo.createAndroidTarget(LocalPlatformPkgInfo.java:248)
at com.android.sdklib.repository.local.LocalPlatformPkgInfo.getAndroidTarget(LocalPlatformPkgInfo.java:104)
at com.android.sdklib.repository.local.LocalSdk.getTargets(LocalSdk.java:712)
at com.android.sdklib.SdkManager.getTargets(SdkManager.java:181)
at com.android.sdkmanager.Main.displayTargetList(Main.java:968)
at com.android.sdkmanager.Main.doAction(Main.java:318)
at com.android.sdkmanager.Main.run(Main.java:151)
at com.android.sdkmanager.Main.main(Main.java:117)…5 more
]
I checked the SDK path but It was right. Also I reinstalled all of android-sdk to resolve the problem
but It was failed.
SDK-tools-version is rev 25.2.4 and sdk-platform tools are 25.0.2
jdk version is 8u111
Is there any compatible issue to use unity3d editor for linux ?
Please let me know how to solve the problem !
A user reported that downgrading sdk tools to 25.2.2 resolves the issue for him/her. We haven’t been able to reproduce this here in order to fix it, so any information you can provide could be helpful.
If you run that command in the console, do you get the same error?
(/usr/lib/jvm/java-8-oracle/bin/java -Xmx2048M-Dcom.android.sdkmanager.toolsdir="/home/yeol/AndroidSDK/tools"-Dfile.encoding=UTF8 -jar "/opt/Unity/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar")
I’d like to add that this worked for me as well. Thanks!!
(Note that I had tried rolling back to having 24 installed only while removing 25 completely (which took awhile for me). And I still received the same error message.) But after removing and replacing just the Tools folder as stated above, it was able to continue the build.
I met the same problem, it happend when I upgrade my android SDK by using Android Studio.
It seems Unity does not supppot Android SDK tools 25.3.1, which change the command “android.bat”.
I have to downgrade to the r25.2.3~
When will unity support the newest version of Android SDK, the Unity 5.5.2p3 is still the same.
Running into this same issue on mac with unity 5.5.2f1, and android sdk tools 25.0.2. I’m with ianholing and watsonsong, is there an update coming to unity to fix this?
I just copied the SDK to another location and downgraded it there specifically for use with Unity while leaving the original copy (used by Android Studio) intact and updated