Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bug cant build android

Discussion in '2019.3 Beta' started by mrm83, Jan 22, 2020.

  1. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    246
    What is this error? Ever since installing 2019 and using the module sdks, i've been receiving errors here and there! How do I fix this?

    CommandInvokationFailure: Gradle build failed.
    /Applications/Unity/Hub/Editor/2019.3.0f5/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2019.3.0f5/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

    stderr[

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':launcher:mergeReleaseResources'.
    > 8 exceptions were raised by workers:
    com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-osx Daemon #1: Daemon startup failed
    This should not happen under normal circumstances, please file an issue if it does.
    com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-osx Daemon #0: Daemon startup failed
    This should not happen under normal circumstances, please file an issue if it does.
    com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-osx Daemon #2: Daemon startup failed
    This should not happen under normal circumstances, please file an issue if it does.
    com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-osx Daemon #3: Daemon startup failed
    This should not happen under normal circumstances, please file an issue if it does.
    com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-osx Daemon #4: Daemon startup failed
    This should not happen under normal circumstances, please file an issue if it does.
    com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-osx Daemon #5: Daemon startup failed
    This should not happen under normal circumstances, please file an issue if it does.
    com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-osx Daemon #6: Daemon startup failed
    This should not happen under normal circumstances, please file an issue if it does.
    com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-osx Daemon #7: Daemon startup failed
    This should not happen under normal circumstances, please file an issue if it does.


    Exporting project and then building with android studio works, but unity 2019 is failing.
     
    Last edited: Jan 22, 2020
  2. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    54
    What device are you building for?
     
  3. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    246
    Android IL2CPP
     
  4. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    54
    Phone, VR Headset? It sounds like there might be an issue with your Android Manifest.
     
  5. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    246
    You were right. The entire manifest file went missing.

    2019 3.0f5 messes with project files?
     
  6. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    54
    It shouldn't but you never know, especially if Unity changed the way they generate a manifest
     
  7. Sailendu

    Sailendu

    Joined:
    Jul 23, 2009
    Posts:
    183
    I am getting the same error while building for Android, did you find any solution for this issue? Please let me know. I am using Unity 2019.4.3f1.
     
  8. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    54
    I believe he was missing his Android Manifest file, you'll need to generate one.
     
  9. Sailendu

    Sailendu

    Joined:
    Jul 23, 2009
    Posts:
    183
    Thanks for replying, can you please tell me where is the manifest file located and how can I generate it? Actually I have no idea about this thing.
     
  10. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    54
    Yes, Unity is supposed to build it automatically for you, but sometimes it can fail. If you don't already have an Assets/Plugins directory, create one. Then create another directory named "Android." In that directory create a new text file and name it "AndroidManifest.xml."

    Then copy the text from this github: https://github.com/Heyzap/unity-example-app/blob/master/Assets/Plugins/Android/AndroidManifest.xml

    and replace the necessary values for your project (i.e. com.example.unity becomes your game package name, etc).

    If you're still having trouble, try watching this video:


    If that still doesn't work, I would open a separate forum post and you can tag me in it.
     
    Sailendu likes this.
  11. Sailendu

    Sailendu

    Joined:
    Jul 23, 2009
    Posts:
    183
    Thanks again for this awesome information, it is really helpful.
     
    Incode likes this.
unityunity