Search Unity

Build Target Android is not supported, switch to Windows or Exit Unity?

Discussion in 'Editor & General Support' started by SanjayBhambhu, Feb 6, 2019.

  1. SanjayBhambhu

    SanjayBhambhu

    Joined:
    Aug 22, 2012
    Posts:
    12
    I am working on a game for android, and I have the Android module downloaded and setup and was doing test builds every day, but ever since 2018.3.* updates, every next day when I open my project in unity I am presented with a small window with this line "Build Target Android is not supported, switch to Windows Standalone or Exit Unity?", and there are two buttons on the bottom "Switch Target" and "Exit Unity".
    • Even If I press "Exit Unity", the build target is set to Windows Standalone the next time I open my project.
    • If I press "Exit Unity", and install and android module and open my project again the build target is set to Windows Standalone for my project.
    • If I open the project as it is, I see these type of options,
    aaa.PNG

    Notice that it says no android module selected, though there is option to "Switch Platform" there.
    In this case if I press the "Switch Platform" button I am stuck in this screen.

    sss.PNG

    If I install the Android module, I am able to work on my project correctly, for the day, but the next day again I have to face this.

    Please help as installing android module and changing the build target to Android everyday is very much time consuming.

    Thank You
     
    melogsy and ina like this.
  2. dominykasm

    dominykasm

    Unity Technologies

    Joined:
    May 27, 2018
    Posts:
    42
  3. newtype1124

    newtype1124

    Joined:
    Feb 19, 2019
    Posts:
    1
    I have the same problem. Work hard unity. This is really stressful
     
  4. SanjayBhambhu

    SanjayBhambhu

    Joined:
    Aug 22, 2012
    Posts:
    12
    Updated to 2018.3.6f1, to still see the same "Switch Target" window, and now it is taking me hours to switch to Windows platform, just so I can switch to Android platform again.
     
    Last edited: Jun 21, 2019
  5. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    139
    I faced the same issue on Unity 2018.3.6f1 today. It was showing that both IOS and Android modules not installed. Reinstalled the Android module (did not install IOS again) and restarted the project, and both IOS and Android modules now available again.

    Same thing happened to me but it didnt spend hours to switch platform as i have enabled the Cache Server. please read about it here. Very helpful for mobile devs who have to switch platforms frequently.
     
  6. harryblack

    harryblack

    Joined:
    Dec 26, 2016
    Posts:
    7
    I have been getting this for sometime now. I install Android module every time and it seems to work fine and then in a few days again, it shows up.
    It is happening right now after 3-4 days of working normally.
    It seems as if the android module gets uninstalled on its own or somehow becomes undetectable by unity. Is there a way to correct this?
     
    Rdev likes this.
  7. harryblack

    harryblack

    Joined:
    Dec 26, 2016
    Posts:
    7
    After I repeatedly tried to get into Unity by exitting it, it got me through and in build settings I am seeing android module intact but in console I see this error


    IndexOutOfRangeException: Index was outside the bounds of the array.
    UnityEditor.Android.AndroidBuildWindowExtension.GetBuildPlayerWindow () (at <e1c3953b4cf040ddb1400046b1c34897>:0)
    UnityEditor.Android.AndroidBuildWindowExtension.RepaintTargetList () (at <e1c3953b4cf040ddb1400046b1c34897>:0)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)
     
  8. woosungwon

    woosungwon

    Joined:
    Oct 8, 2018
    Posts:
    1
    This issue appears to occur when you install a 2018.3.x or earlier version and update it multiple times to a higher version.

    It also occurs at 2018.3.8f1.
    This problem occurs 100% after rebooting Windows.

    I installed the same version on both my laptop and desktop.
    The problem only occurs on the desktop.

    Uninstalling and reinstalling Unity at this time and installing the Android support module will not fix the problem.

    When you run Unity, first open a blank project, change the project to Android, then open the wrok project and open it normally. It is a way to shorten the time.

    I hope this issue will be resolved soon.
     
  9. sarebots2

    sarebots2

    Joined:
    Jul 4, 2016
    Posts:
    23
    I'm facing the same problem, every time I restart Unity, it can't detect android module. I have to reinstall the android module by running "UnitySetup-Android-Support-for-Editor-2018.3.8f1.exe" or switch to standalone, open project, switch back to android (Even then the build option is greyed out in build settings, but the build and run option from file menu works, make sure the unity icon is next to android in build settings)
     
  10. alap18

    alap18

    Joined:
    Oct 31, 2014
    Posts:
    1
    This worked for me: opening a blank project, switching to Android and then opening up my work project.
     
  11. Jianyong_Luo_2014

    Jianyong_Luo_2014

    Joined:
    Nov 29, 2014
    Posts:
    1
    anyone has final solution on this? This occurs with unity 2018.3.8.
     
  12. charlesntt

    charlesntt

    Joined:
    Jul 28, 2017
    Posts:
    1
    Is the same for me, updated Unity, 2018.3.8 e it continues. The modules already instaled. I need to open in standalone e close the project, after this I re-open e switch platform works, but is tedius do the same thing all the time.
     
  13. ekaralar

    ekaralar

    Joined:
    Jan 13, 2015
    Posts:
    10
    Having the same problem with 2018.3.8 for IOS.
    Any solution Unity?
     
    melogsy likes this.
  14. tjPark

    tjPark

    Joined:
    Mar 19, 2015
    Posts:
    2
    Before you select your project,
    select "Learn" Tab, then back to "Project" tab and select your project.
    This solved me the problem. (osx Mojave, 2018.3.6f1)
     
    pujanparikh2209, JJ-OBA, ina and 2 others like this.
  15. romantic_dream2008

    romantic_dream2008

    Joined:
    Sep 8, 2017
    Posts:
    1
    same here Unity_2018.3.7f1
     
  16. Qasim337

    Qasim337

    Joined:
    Oct 16, 2015
    Posts:
    1
    This happened with Unity 2018.3.5, I updated to Unity 2018.3.8, but after few days, happening again.


    If I close the error window, create a new project and open the old project from File menu, it works fine without having to reinstall plugin and switch platform
     
  17. Its4u

    Its4u

    Joined:
    Oct 11, 2013
    Posts:
    13
    This works for me. Thanks

    This issue still happens in Unity 2018.3.9
     
  18. nikescar

    nikescar

    Joined:
    Nov 16, 2011
    Posts:
    98
    This has been happening to me on every version of 2018.3. The difference for me is it only happens after a Unity crash.
     
    ina likes this.
  19. pikychu

    pikychu

    Joined:
    Sep 18, 2014
    Posts:
    2
    unity 2018.3.10f1 same here
     
  20. tmongy

    tmongy

    Joined:
    May 9, 2014
    Posts:
    1
    Thanks that worked!
     
  21. dchakrabarty

    dchakrabarty

    Joined:
    Mar 1, 2019
    Posts:
    2
    After upgrading Mac to Mojave 14.10.4, the same happened with me. I did the same thing after reading your post and strangely it worked!
     
    ina and Waynecai123 like this.
  22. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    807
    This solved it for me for the iOS module for Mojave
     
  23. trooper

    trooper

    Joined:
    Aug 21, 2009
    Posts:
    666
    I'm speechless, worked on Windows 10.
     
  24. Crz-t

    Crz-t

    Joined:
    May 31, 2016
    Posts:
    6
    Thx,Works for me !
     
  25. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,116
    Have you set the path to the Android SDK under Preferences/External Tools? I suspect everyone here has, but had to ask.
     
  26. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    139
    Yes, I have. Cant say for others but they probably have as it used to work but stops later.
     
  27. KaOzz

    KaOzz

    Joined:
    Oct 15, 2012
    Posts:
    34
    That worked for me! Thanks.
     
  28. tnluan

    tnluan

    Joined:
    Feb 17, 2017
    Posts:
    1
    Thanks, you saved me!
     
  29. akshayg6590

    akshayg6590

    Joined:
    Apr 28, 2019
    Posts:
    1
    This worked!!
     
  30. unity_moN7x4zmQZyK8w

    unity_moN7x4zmQZyK8w

    Joined:
    Nov 7, 2018
    Posts:
    1
    hi
    If you work without Android studio , you must install Android sdk & Jdk And from the section Edit>Preferences>External>tools Manually install in Unity.
    better is install Android Studio then you can take output of unity
     
  31. TerrenceRao

    TerrenceRao

    Joined:
    Jun 19, 2015
    Posts:
    4
    Same Problem in (Osx mojave ,unity 2018.3.14f1)
    And This solved me the problem. Thanks
     
  32. pujanparikh2209

    pujanparikh2209

    Joined:
    Jun 1, 2019
    Posts:
    1
    god. works 100%
     
  33. artanist

    artanist

    Joined:
    Oct 28, 2014
    Posts:
    7
    I use 2018.4.1 and the problem is still there. Didn't try the workaround, but thanks in advance !
     
  34. peter171

    peter171

    Joined:
    Mar 19, 2019
    Posts:
    1
    2018.4.2f1 same here
     
  35. unnamed7

    unnamed7

    Joined:
    Feb 18, 2016
    Posts:
    2
    This worked for Win10!
     
  36. popyoung

    popyoung

    Joined:
    Apr 3, 2018
    Posts:
    1
    I reset the path to the Android SDK under Preferences/External Tools and problem fixed
     
  37. JonPQ

    JonPQ

    Joined:
    Aug 10, 2016
    Posts:
    66
    I have this problem also with Unity hub 2019.1.9 pro license...
    installed 2019 with droid and iOS support checked. (I also already have android studio installed and previous version of unity 5.6.3p3 installed without Hub) I opened opened project once (selecting Android mode in hub before opening) that worked, but it showed "free" hud, not Pro unity dark Hud, so clicked on "Manage License"... logged in. went back to unity. unity crashed... So I re-launched 2019 from hub. hub now insists I am not licensed to load it in Android mode... even though I am. and already logged in, and It still shows I have droid and ios build support installed.
    If I do as it says, and switch/load in PC standalone mode, now I cannot change to Android mode in settings. I cannot edit any SDK/JDK info as the slots are missing from build settings.
    The "learn" tab trick above does not work.
    restart doesn't work.
    deleting Library folder doesn't work

    any other ideas please ? thanks
    Should I just dump Hub and do a manual install and setup ?

    follow up...
    following day, everything just worked. Assuming unity was having license server issues yesterday.
     
    Last edited: Jul 23, 2019
  38. paranoidAndroid

    paranoidAndroid

    Joined:
    Feb 4, 2013
    Posts:
    3
    Im also getting this on 2018.4.3f1, For some reason it says no android target found, then switches to Standalone, takes around 2 hours to import then I have to switch it back to Android then wait another 2 hours.

    Its a serious issue that really halts development.

    I tried using the cache system, but this always errors out and I have to reimport everything again anyway.. it takes longer as it tries to use the cache before failing.

    Be nice to see things like this fixed before new shiny features are created.
     
  39. Sompol_Rznet

    Sompol_Rznet

    Joined:
    Sep 14, 2018
    Posts:
    10
  40. Keisanwanko

    Keisanwanko

    Joined:
    Jul 19, 2018
    Posts:
    1
    Same thing happened on me. I'm using Win10 and Unity 2018 4.4f1 (64-bit), LTS version.
    Enabling local cache server from Edit > Preferences seems like settling this problem .. as for now ..
     
    Sompol_Rznet likes this.