Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

No internal option on Android Build

Discussion in '2019.1 Beta' started by jojo_UK, Dec 6, 2018.

  1. jojo_UK

    jojo_UK

    Joined:
    Nov 4, 2016
    Posts:
    3
    I have updated to the latest version of Unity 2019.1

    For some reason I no longer have internal as a option on my Android Build System to pick from?



    How do I get this back?

    Thanks
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,576
    The release notes say that they removed it.

     
  3. jojo_UK

    jojo_UK

    Joined:
    Nov 4, 2016
    Posts:
    3
    OK thanks, bit of a pain, been doing it that way for years.
     
  4. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    323
    Internal build system has been marked as deprecated for a while now so the time has come for it to go. We will still support internal build system in 2018LTS for a while. Gradle has completely replaced it and there is nothing gradle can't do that internal system could. On the other hand Gradle solves some of the issues that internal system still has, like dex limit.
     
  5. paulodgn

    paulodgn

    Joined:
    Jul 19, 2016
    Posts:
    2
    Small change but its very sad for me to hear. Being able to build directly for the device is a must. Its a lot faster to deploy and test while in development. Why don't you let it stay on the editor? at least for some quick builds for testing and debug.
     
    micsanbr likes this.
  6. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    323
    With Gradle you can still build directly to the device. Just make sure "Export Project" is not selected and click the "Build And Run" button.
     
  7. frameshubstudio

    frameshubstudio

    Joined:
    Sep 10, 2018
    Posts:
    1
    I never made this gradle build... It always pops errors. When will you implement AUTOIMPORT / DOWNLOAD for ALL tools needed to build on Android? Why remove the most stable way of building for Android in Unity?
     
    micsanbr likes this.
  8. Alkanov

    Alkanov

    Joined:
    May 15, 2017
    Posts:
    40
    Im on the same bus here.

    Any official Unity + Gradle tutorials till the final .apk?
     
  9. prashantsavalia

    prashantsavalia

    Joined:
    Apr 22, 2019
    Posts:
    5
    I'm on a restrictive machine at work and I can't get gradle to succeed no matter what I do. It passes every other stage, but when it goes to build the gradle, it crashes. I'm building a proof of concept VR project for android. Everything else seems to be working. When I hit play, I have control over movement and everything. I would like to test it on my phone to make sure it works as expected, but I can't get a success build. I've tried EVERY solution on the net, but none have worked. Like others on this forum, I don't have the internal build option in Unity 2019.10f2. Is there a way for me to build without gradle or get the resources needed to build without going to maven? My system doesn't allow applications to connect to external systems.
     
    micsanbr likes this.
  10. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,377
    Could you please submit a bug report with a minimal reproduction project for this issue?
     
  11. prashantsavalia

    prashantsavalia

    Joined:
    Apr 22, 2019
    Posts:
    5
    Hello LeonardP, I tried to report bugs through Unity Bug Report, but again, can't connect to SSH or HTTPS sites via the application. Is there another way I can report it? I also tried to put up a question with screenshots, but that apparently didn't work because I can't find my question anywhere, even in my own account.

    Below is the message I'm getting. I've also attached a screenshot if that helps. I'm only trying to build the HelloVR demo sample from googleVR for Unity. I haven't changed anything but the paths to the SDK, NDK, JDK, and Gradle because I had to download those myself since I can't use Android Studio to download them. Any advice is much appreciated. Thank you.

    CommandInvokationFailure: Gradle build failed.
    C:/Program Files/Java/jdk1.8.0_172\bin\java.exe -classpath "C:\Gradle\gradle-5.4.1\lib\gradle-launcher-5.4.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

    stderr[

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project 'gradleOut'.
    > Could not resolve all artifacts for configuration ':classpath'.
    > Could not resolve com.android.tools.build:gradle:3.4.0.
    Required by:
    project :
    > Could not resolve com.android.tools.build:gradle:3.4.0.
    > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
    > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
    > Unrecognized SSL message, plaintext connection?
    > Could not resolve com.android.tools.build:gradle:3.4.0.
    > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
    > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
    > Unrecognized SSL message, plaintext connection?

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 0s
    ]
    stdout[

    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <177bc8179be6497489c4b5b319f290d7>:0)
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <177bc8179be6497489c4b5b319f290d7>:0)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <177bc8179be6497489c4b5b319f290d7>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>:0)
    Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <177bc8179be6497489c4b5b319f290d7>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <177bc8179be6497489c4b5b319f290d7>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <177bc8179be6497489c4b5b319f290d7>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
    UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
    Build completed with a result of 'Failed'
    UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
    UnityEditor.BuildPlayerWindow+BuildMethodException: 26 errors

    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194

    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
    UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
     

    Attached Files:

  12. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    323
    When you build with gradle, it tries to download needed dependencies automatically. In your case it's trying to download android gradle plugin. Since you've said that your work machine is somehow restricted, that seems to prevent gradle from downloading that dependency. Would it be possible for you to avoid those restrictions at least once, so the gradle could download all needed dependencies for your project? If that's impossible, you could try to execute a similar project on a different machine that does not have a restricted network access and after that copy gradle cache (which should include required dependencies) from one machine to another. Gradle cache is in your user home directory in .gradle/caches.
     
  13. prashantsavalia

    prashantsavalia

    Joined:
    Apr 22, 2019
    Posts:
    5
    Thank you JuliusM. I successfully built the HelloVR project on my home computer and copied the entire .gradle folder, just in case, to my work computer. I'm still getting errors:

    CommandInvokationFailure: Gradle build failed.
    C:/Program Files/Java/jdk1.8.0_172\bin\java.exe -classpath "C:\Gradle\gradle-5.4.1\lib\gradle-launcher-5.4.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx8192m" "assembleRelease"

    stderr[

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project 'gradleOut'.
    > Could not resolve all artifacts for configuration ':classpath'.
    > Could not resolve com.android.tools.build:gradle:3.2.0.
    Required by:
    project :
    > Could not resolve com.android.tools.build:gradle:3.2.0.
    > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'.
    > Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'.
    > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    > Could not resolve com.android.tools.build:gradle:3.2.0.
    > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'.
    > Could not HEAD 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'.
    > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 3s
    ]
    stdout[

    ]

    Any thoughts on how to resolve this? When I go to the dl.google.com link, it doesn't present any certificates for me to save or add to anything that unity could use to accept or trust the cert. It just asks me where I want to save the POM file. The jcenter link doesn't work at all in any browser. I get a 404 page.
     
  14. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    323
    Did the project that you've built at your home computer require the same android gradle plugin version? For example on my machine in .gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle I have a few plugin versions cached. Could you check if your work machine cache contains the 3.2.0 version? If it does and the build still fails with the same error, then I can't think of another way to make this work other than to connect your work computer to a not restricted network, build the project once and then after the required dependencies will be cached, you could return to the restricted network.
     
  15. prashantsavalia

    prashantsavalia

    Joined:
    Apr 22, 2019
    Posts:
    5
    Hello JuliusM,

    Thank you for getting back to me. They were both using the same version of every SDK and gradle. I made sure of that before overwriting anything on my work computer. I will try one other option and see if it works. IT won't remove the restriction on the machine or network, so I'm stuck on that point. But I am going to try to connect my work computer to my mobile hotspot and see if the build works over that network instead of my work network. If it does, I'll see what happens when I return to my work network and rebuild. My hope is that you are correct and it doesn't have a fit when I go back to my work network. I will report shortly.
     
  16. prashantsavalia

    prashantsavalia

    Joined:
    Apr 22, 2019
    Posts:
    5
    Hi JuliusM,

    So I tried to connect my work computer to my mobile hotspot but it's not allowing it. There's a compliance thing installed that doesn't allow other WIFI singles that aren't compliant to their settings I guess. I'm considering uninstalling everything and starting over. But that will have to wait until next month since I have another project with a tighter deadline. Thank you for your help JuliusM. If you can think of anything else, please let me know. I will be more than happy to try anything to get this working, within my access and permission levels.
     
  17. micsanbr

    micsanbr

    Joined:
    Apr 8, 2014
    Posts:
    8
    I am having the same error, here.
    I work for a very large organization (300.000+ employees) and everyone is working behind a proxy.
    None is testing this scenario before deprecating features like this one at Unity Technologies?
    In 2018.3 I could at least still use the internal build.
    I am working on a VR training application so I need to test things often on a device.

    Now I am supposed to disconnected from the intranet, disable proxy settings, remove a bunch of environment variables, connect using my phone as hotspot, re-add the environment variables, enable the proxy settings, reconnect to the intranet for every test build?
    This is very painful and slow.

    The suggested alternative is even worse (copy the project on another pc outside the intranet, build, copy the gradle cache, etc.) and does not seem to work at all.