Search Unity

Building Android bundles breaks features like AR

Discussion in 'Android' started by monark, Oct 2, 2019.

  1. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    So I'm finding that if I build an app bundle using Gradle then a load of stuff that works fine in individual apks gets broken. For example Vuforia AR stops detecting AR core being available.

    I can build an apk using the internal build system and all checks out fine, ARM64 or ARMv7 or joint doesn't matter.
    I can export a Gradle project and build an apk and that works too.

    However in order to publish I'm building signed app bundles and as soon as I do and install via the app store then things stop working, anything that needs a 3rd party library seems to stop functioning.

    Is there some trick to building a Gradle project generated from Unity to an app bundle to stop this happening?

    Unfortunately building a bundle directly from Unity fails to work so I haven't been able to test that option.
    Everything I tried to fix that has failed.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,902
    Did you check the logcat for errors?

    Also, what kind of errors you see when exporting app bundle from Unity?
     
  3. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    I'm not seeing any errors in the Pre-launch tests. Just 1 warning about APIs

    API
    Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V

    The error I get building from Unity directly is:

    ...The sticking out tongue emoji's are now just taunting me :(
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,902
    Google says, that's something is locking your cache, search for fileHashes.lock in <userprofile>\.gradle\caches\

    Try deleting it
     
  5. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Creates a new lock file when I build and then seems to give much the same results

     
    Last edited: Oct 3, 2019
  6. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    So giving up on bundles until this gets fixed, hopefully Google don't drop support for apks
     
  7. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
  8. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Unfortunately I'm using 2018.3.14 and these are different instructions to those you posted

    These are the ones I followed
    https://docs.unity3d.com/2018.3/Doc...667.1369058017.1570450803-62453373.1568817120


    2018.3.14 doesn't give me the option to install the Android SDK via the hub