Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    345
    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:
    78
    What device are you building for?
     
  3. mrm83

    mrm83

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

    Incode

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

    mrm83

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

    2019 3.0f5 messes with project files?
     
  6. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    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:
    254
    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:
    78
    I believe he was missing his Android Manifest file, you'll need to generate one.
     
  9. Sailendu

    Sailendu

    Joined:
    Jul 23, 2009
    Posts:
    254
    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:
    78
    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:
    254
    Thanks again for this awesome information, it is really helpful.
     
    Incode likes this.