Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

unity3d 5.5.0fx Unable to list target platforms error

Discussion in 'Linux' started by Yeol_, Dec 14, 2016.

  1. Yeol_

    Yeol_

    Joined:
    Jan 11, 2016
    Posts:
    1
    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 !
     
    tom99ato and sycarrot like this.
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    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")
     
  3. ChaimHong

    ChaimHong

    Joined:
    Feb 28, 2017
    Posts:
    2

    MacBook-Air:~ hongchunhui$ /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/hongchunhui/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar"
    Error:Usage: sdktools <command> | - (read arguments from stdin)
     
  4. ChaimHong

    ChaimHong

    Joined:
    Feb 28, 2017
    Posts:
    2
    I also encountered this problem
     
  5. terro

    terro

    Joined:
    Nov 10, 2016
    Posts:
    2
    Got the same error, after upgrading Android SK Tools to 25.3.1
     
  6. Team2S

    Team2S

    Joined:
    Feb 27, 2017
    Posts:
    1
    Downgrading to 25.2.2 solution works. Thanks a lot for help!
     
  7. PiedLove_com

    PiedLove_com

    Joined:
    Oct 13, 2014
    Posts:
    4
    Same error has today in Eclipse and now in Unity.
    Found great solution from distributor:

    1) just open https://developer.android.com/studio/index.html

    2) scrolldown to the bottom of that page

    3) find Windows "tools_r25.2.3-windows.zip"
    download and unzip it

    4) remove and replace your folder "SDK" + "/tools"

    5) Enjoy!

    6) By "SDK Manager" do upgrade to 25.2.5

    7) Now works all: Eclipse, Android Studio, Unity.
    Enjoy again!
     
  8. Symyon

    Symyon

    Joined:
    Nov 26, 2012
    Posts:
    31
    This is the problem:
    They just removed the "android" command with the new update. Rolling back works.
     
    guneyozsan and LuckSoft like this.
  9. ILonion

    ILonion

    Joined:
    Oct 26, 2015
    Posts:
    69
  10. PhotoshopTutorials

    PhotoshopTutorials

    Joined:
    Mar 5, 2017
    Posts:
    1
    Thanks a lot man!!!!
     
  11. HiAvatar

    HiAvatar

    Joined:
    Jan 9, 2015
    Posts:
    5
    You are a nice man!! I love you!!
     
  12. Julian-Glenn

    Julian-Glenn

    Joined:
    Jul 23, 2010
    Posts:
    97
    Can we get this remedied?
     
  13. ianholing

    ianholing

    Joined:
    Nov 15, 2015
    Posts:
    9
    Same here please I'm also Android Dev and I cannot just downgrade the tools. Is there any other workaround or fix?
     
    flexronin and medright like this.
  14. chintan_mehta

    chintan_mehta

    Joined:
    Mar 13, 2017
    Posts:
    2
     
  15. chintan_mehta

    chintan_mehta

    Joined:
    Mar 13, 2017
    Posts:
    2
    Thanks bro.. it works :D
     
  16. thedarcsage

    thedarcsage

    Joined:
    Nov 2, 2016
    Posts:
    23
    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.

    To reference something else mentioned in this post: https://answers.unity3d.com/questio...-platforms-when-i-try-to-buil.html?sort=votes

    I stopped getting the error "Invalid command android" too once I removed and replaced the contents of the Tools folder.
     
  17. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    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.
     
    Last edited: Mar 19, 2017
    ianholing and medright like this.
  18. medright

    medright

    Joined:
    Dec 7, 2016
    Posts:
    1
    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?
     
    ianholing likes this.
  19. RAIDS-Apps

    RAIDS-Apps

    Joined:
    Feb 1, 2016
    Posts:
    1
    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
     
  20. cardex107

    cardex107

    Joined:
    Dec 29, 2015
    Posts:
    2
    Thanks!!!
     
  21. Elvys_Araujo

    Elvys_Araujo

    Joined:
    Mar 25, 2017
    Posts:
    1
    Obrigado!!! Deu certinho.
     
  22. neartoyou

    neartoyou

    Joined:
    Mar 5, 2017
    Posts:
    1
    will the unity fix this so it is compatible with new version of android? thank you :D
     
  23. estebandeath

    estebandeath

    Joined:
    Mar 30, 2017
    Posts:
    1
    Thanks a lot man!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
  24. croocio

    croocio

    Joined:
    Mar 30, 2017
    Posts:
    1
    PiedLove_com

    I LOVE U

    Cancer was cured when I saw this solution.
     
    Last edited: Mar 30, 2017
    ShubhaBrotaPal likes this.
  25. hphillip21

    hphillip21

    Joined:
    Mar 30, 2017
    Posts:
    2

    INCREDIBLE. I was just setting everything up to do an online course and am completely new to Unity and Android SDK. I was worried I wasn't gonna be able to figure it out, but the explanation was clear. This solution worked and was the most amazing thing I could have asked for.

    You da real MVP
     
    Last edited: Mar 30, 2017
  26. dejandex86

    dejandex86

    Joined:
    Dec 31, 2016
    Posts:
    1
    Thank you
     
  27. ameralay

    ameralay

    Joined:
    May 6, 2014
    Posts:
    9

    Thanks a lot that worked for me too! great thanks!
     
  28. londonwill

    londonwill

    Joined:
    Mar 10, 2017
    Posts:
    2
    Same error, I spent 2 or 3 hours wondering what I'd done wrong ............

    Thx for the answer !
     
  29. p50s

    p50s

    Joined:
    Apr 1, 2017
    Posts:
    1
    Thanks man!!
     
  30. TheSv3n

    TheSv3n

    Joined:
    Apr 2, 2017
    Posts:
    1
    This worked for me straight away. Thanks dude! :)
     
  31. s7-Elements

    s7-Elements

    Joined:
    Sep 4, 2014
    Posts:
    1

    Thanks a lot! worked for me too! :)
     
  32. Fantomwon11

    Fantomwon11

    Joined:
    Apr 5, 2017
    Posts:
    1
    Downgrading to 25.2.2 also worked for me. I am running windows 10. My SDK Platform Tools are at version 25.0.4.

    Also, if you're having trouble figuring out how to 'rollback'/'downgrade' your SDK tools I found this post to be really helpful: http://stackoverflow.com/a/11514698


    -D
     
  33. millefoliumink

    millefoliumink

    Joined:
    Aug 28, 2014
    Posts:
    139
    Is this an issue with 5.6? I'm using 5.5.2f1 and I'm wondering whether upgrading Unity would resolve this.
     
  34. kork

    kork

    Joined:
    Jul 14, 2009
    Posts:
    280
    I just tried with 5.6, same issue.
     
    millefoliumink likes this.
  35. davidbeloosesky

    davidbeloosesky

    Joined:
    Jan 3, 2017
    Posts:
    4
    Thanks PiedLove_com, your solution did help!! :)
     
    BenoitFreslon likes this.
  36. milamila

    milamila

    Joined:
    Nov 21, 2013
    Posts:
    16
    Thank you it works!
    Important in my case was not to replace the folder but just files inside.
     
  37. NathanGroovy

    NathanGroovy

    Joined:
    Sep 9, 2015
    Posts:
    43
    I'm experiencing this problem too. This is the error I'm currently receiving when trying to build my game:


    Anybody have any ideas?
     
  38. RafayAli

    RafayAli

    Joined:
    Mar 31, 2015
    Posts:
    7
    Tried Unity 5.6, same issue still, had to downgrade SDK tools to 25.2.3
     
  39. skullthug

    skullthug

    Joined:
    Oct 16, 2011
    Posts:
    202
    Is there any issue open related to this? Tell me where to put my votes.
     
  40. pbeer

    pbeer

    Joined:
    Dec 20, 2015
    Posts:
    14
  41. macgyver214

    macgyver214

    Joined:
    Apr 14, 2017
    Posts:
    1
    Thanks a bunch for this! It really is as simple as just inserting an old version of the build tools until Unity comes out with a fix.
     
  42. Undertaker-Infinity

    Undertaker-Infinity

    Joined:
    May 2, 2014
    Posts:
    112
    thaaaaaaaanks, this saved me!
     
  43. DanBourque

    DanBourque

    Joined:
    Jul 13, 2013
    Posts:
    3
    Thanks! This worked for me.
     
  44. ekowalc

    ekowalc

    Joined:
    Mar 25, 2017
    Posts:
    1
    Removing the tools and downgrading worked here as well., Thanks a ton!
     
  45. VeganApps

    VeganApps

    Joined:
    Jun 30, 2006
    Posts:
    263
  46. awaywing

    awaywing

    Joined:
    Apr 27, 2017
    Posts:
    1

    thanks man, it works!
     
  47. VeganApps

    VeganApps

    Joined:
    Jun 30, 2006
    Posts:
    263
    I just noticed that this bug is not yet fixed in 2017.1 beta 2.
    Reported it..
     
  48. michael_house

    michael_house

    Joined:
    May 24, 2013
    Posts:
    17
  49. Hoorza

    Hoorza

    Joined:
    May 8, 2016
    Posts:
    45
    Had a same problem, I do not know if it is just me or something changed on the Android website but I could not download/find: "tools_r25.2.3-windows.zip", after googling it I have found it on this website:
    https://fossies.org/windows/misc/android-tools_r25.2.3-windows.zip/

    or use link that Byte56 has posted above.

    just tested it and works like a charm!!!! Thanks !
     
    taxvi and guneyozsan like this.
  50. VeganApps

    VeganApps

    Joined:
    Jun 30, 2006
    Posts:
    263
    I got an answer from UT:
    "... This issue should be fixed in 2017.1.0b3 when it comes out, is fixed in 5.6.0p3 and will be backported to 5.5 and 5.4 (no exact version yet). ..."

    Oh and btw. this isn't Linux specific. I am on Windows.

    Edit: It works with 2017.1 b3.. finally. :D
    Just use the tools folder shipped with your installed Android Studio version.
     
    Last edited: May 4, 2017
    Space_Lab likes this.