Search Unity

Issues with Android development

Discussion in 'Linux' started by Joseph-Ferano, Jun 25, 2018.

  1. Joseph-Ferano

    Joseph-Ferano

    Joined:
    Jul 18, 2008
    Posts:
    165
    Hi, so I'm on Pop_OS which is just Ubuntu 17.10 as the base. First, I'm trying to build and I have `openjdk-9-jdk` installed through apt-get. However, when I try selecting the directory where its installed, I keep getting this;

    Code (csharp):
    1. The path you specified does not look like a valid JDK installation.
    2. Android development requires at least JDK 8 (1.8), having JRE only is not enough. Please make sure you are selecting a suitable JDK home directory, or download and install the latest JDK:
    3. http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
    I tried selecting the root, the bin directory, the lib, nothing seems to work. I keep getting that error.

    This person seems to be having the same issue;

    https://askubuntu.com/questions/727057/cant-find-jdk-for-unity3d-development

    Next, I'm trying to use the Android remote and I can't seem to get my dist and my note 8 to connect, and I keep getting this image;



    Any help would be appreciated.
     
  2. Joseph-Ferano

    Joseph-Ferano

    Joined:
    Jul 18, 2008
    Posts:
    165
    Can anyone help with this? I still can't build to android, here are some exceptions I get when I switch to android target

    Code (CSharp):
    1. GooglePlayServices.JavaUtilities+ToolNotFoundException: jar not found, /usr/lib/jvm/java-1.8.0-openjdk-amd64 references incomplete Java distribution.
    2.   at GooglePlayServices.JavaUtilities.FindJavaTool (System.String javaTool) [0x00057] in <4988cb4c158d4971989a7eb4c105c164>:0
    3.   at GooglePlayServices.JavaUtilities.get_JarBinaryPath () [0x00000] in <4988cb4c158d4971989a7eb4c105c164>:0
    4.   at GooglePlayServices.DefaultResolver.ExtractAar (System.String aarFile, System.String[] extractFilenames, System.String outputDirectory) [0x0003b] in <4988cb4c158d4971989a7eb4c105c164>:0
    5. UnityEngine.Debug:LogError(Object)
    6. GooglePlayServices.DefaultResolver:ExtractAar(String, String[], String)
    7. GooglePlayServices.ResolverVer1_1:ShouldExplode(String)
    8. GooglePlayServices.ResolverVer1_1:LoadAarExplodeCache()
    9. GooglePlayServices.ResolverVer1_1:.ctor()
    10. GooglePlayServices.PlayServicesResolver:.cctor()
    11. UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
    12.  
    upload_2018-10-5_15-37-23.png

    Also this

    Code (csharp):
    1.  
    2. Failed to get Java version when running /usr/lib/jvm/java-1.9.0-openjdk-amd64/bin/java
    3. It is not be possible to verify your Java installation is new enough to compile with the latest Android SDK
    4.  
    5. Successfully executed '/usr/lib/jvm/java-1.9.0-openjdk-amd64/bin/java -version'
    6. stdout:
    7.  
    8. stderr:
    9. openjdk version "9-Ubuntu"
    10. OpenJDK Runtime Environment (build 9-Ubuntu+0-9b181-4)
    11. OpenJDK 64-Bit Server VM (build 9-Ubuntu+0-9b181-4, mixed mode)
    12.  
    13. exit code: 0
    14.  
    15. UnityEngine.Debug:LogWarning(Object)
    16. Google.Logger:Log(String, LogLevel)
    17. GooglePlayServices.PlayServicesResolver:Log(String, LogLevel)
    18. GooglePlayServices.JavaUtilities:LogJdkVersionFailedWarning(String, String)
    19. GooglePlayServices.JavaUtilities:CheckJdkForApiLevel()
    20. GooglePlayServices.PlayServicesResolver:ResolveUnsafe(Action`1, Boolean)
    21. GooglePlayServices.<Resolve>c__AnonStorey11:<>m__19()
    22. GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob()
    23. GooglePlayServices.PlayServicesResolver:Resolve(Action, Boolean, Action`1)
    24. GooglePlayServices.PlayServicesResolver:AutoResolve()
    25. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    26.  
    Any idea why the Unity editor won't choose the JDK? What's the path I should be providing?