Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Unable to locate a Java Runtime - Android Build Export

Discussion in 'Android' started by siddharth3322, May 21, 2022.

  1. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,042
    When I was trying to export a build, I was getting this kind of error:
    unable to locate java runtime.png

    After adding AdMob library, I started getting this kind of error before within my project no external library exist.
    Its saying Unable to Locate Java Runtime but I have already linked all external tools to default settings.

    Check below image:
    external tools.png

    At present, I have just installed Unity 2021.3.3 because similar problem I have faced with Unity 2021.1.13 version so I upgraded to LTS version but still getting this error.

    Please give me some suggestion for this.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,682
    Could you attach Editor.log containing your error?
     
  3. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,042
    Hello Sir, here you have editor log file, after I have started exporting a android build:
     

    Attached Files:

  4. pixaware_pwedrowski

    pixaware_pwedrowski

    Joined:
    Oct 25, 2018
    Posts:
    116
    RiverCanvas and siddharth3322 like this.
  5. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,682
    Alternatively try executing this command from terminal

    Code (CSharp):
    1. /Applications/Unity/Hub/Editor/2021.3.3f1/PlaybackEngines/AndroidPlayer/SDK/tools/bin/sdkmanager --list
     
  6. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,042
  7. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,042
    Sorry I have to reopen this thread because on other day I opened my project and it stopped exporting android build.
    Just one day it worked and now it was not working though I have multiple times done the same step.

    Here I am giving you console output after executing the command:
    sdk manager command.png

    Please help me into this.
     
  8. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,042
    These two steps helped me to run my project on MacOS and export Android build:
    external tools edited.png
     
  9. JTJam

    JTJam

    Joined:
    Jul 17, 2015
    Posts:
    8
    That worked for me, thanks for shareing the solution!
     
  10. bab202

    bab202

    Joined:
    Oct 18, 2018
    Posts:
    9
    Thanks for the worked workaround. I face with this issue today in Unity 2022.3.5 LTS.