Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Googleplay 64bit console warning

Discussion in 'Editor & General Support' started by Lethn, May 5, 2019.

  1. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    Could anyone explain to me what this 64 bit warning by the googleplay console is about and how I would get Unity android to build in 64 bit? I had no idea about this beforehand and this is the first that I've heard of it, is it difficult to get 64 bit working? Here's the full warning I get.

    https://developer.android.com/distribute/best-practices/develop/64-bit
     
  2. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    Bumping, could somebody point me towards any documentation or tutorials that show how to make my apps 64 bit so I don't get the warning quoted?
     
  3. Gustavo-Z

    Gustavo-Z

    Joined:
    Feb 19, 2019
    Posts:
    1
    I'm surprised how little I could find on this topic, I was having the same issues of course, now that Google is enforcing(ish) these policies, with full requirements starting in August of this year.

    Anyhow, I found this post on StackOverflow:
    https://stackoverflow.com/questions/55974331/unity-export-android-64-bit

    Which started me in the right direction. Just for link safety, it basically boils down to this:
    Go to File > Build Settings > Player Settings > Other Settings
    Change "Scripting Backend" to "IL2CPP", and make sure all boxes under "Target Architectures" are checked.
    upload_2019-5-6_22-57-51.png

    Now, as of Unity 2018.3 (which is the version I'm using here), there's an option in Build Settings to export to an App Bundle, which is what I did and seems to be the recommended thing to do moving forward.
    upload_2019-5-6_23-0-8.png

    If you try to build now, it will fail unless you have the Android NDK installed (which you probably don't). Guides online say to do it through Android Studio, but when I tried that, it installed a version that Unity apparently didn't like. So I downloaded my version from this link:
    https://dl.google.com/android/repository/android-ndk-r16b-windows-x86_64.zip

    Obviously if that package isn't compatible with your machine, you'll have to find something different. If that's the case, this link is where I actually started with installing the NDK, so it might help:
    https://developer.android.com/ndk/guides#download-ndk

    NOW, you should be able to successfully build your app. It took me 3-4 times longer to build than usual after doing all this, but my app was something like 15MB smaller in size once uploaded to the Google Play store, so I'm happy with it. If you've selected the "Build App Bundle" in the Build Settings, you won't get an .apk file, but instead an .aab file AND a .symbols.zip file. You want to upload the .aab file to the Google Play Console, and it should work the same as an APK.

    First time poster on pretty much any kind of forum, so take that as you will. But I kind of felt obligated to post here after not finding any other resources on the web that spelled all of these steps out. Hope it helps.
     
    Last edited: May 8, 2019
  4. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    Thank you! This is really helpful, hopefully this should help out anyone else searching for the problem too yes, I was finding very little on google beyond some documentation that didn't really explain how to fix the problem in Unity. Now I can update my app before the google's end date.

    At least I know now it wasn't just me that was struggling to find stuff on this, looks like I was right to make a topic. What surprises me is despite the date fast approaching Unity hasn't simply built this option into the engine itself somehow.
     
    Last edited: May 7, 2019
    marcosjpin and discrockers like this.
  5. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    So for the hell of it I decided to build Unity without messing around with any third party software, it turns out they have got built in support for ARM64 and NDK as the libraries automatically compiled and built for me when I clicked the build button. Before that I got a couple of warnings when enabling those options you mentioned but the instructions were very clear and I just had to disable and remove some options.

    For first time users, be warned, it will take awhile to install and may look like it's frozen but that's just the necessary libraries compiling themselves for you, I just did the build a second time and it seems to be compiling ARM64 each time. I don't know what verison of unity @Gustavo-Z is running but I have 2019.1.0f2 and I didn't have to do the steps he took, the only thing I did was make sure Android Studio was up to date.

    It would be really nice actually if we could have a Unity staff member chime in and let us know what the hell is going on with googles' compatibility requirements and these libraries.
     
    siddharth3322 and discrockers like this.
  6. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    Just as an extra note, on the googleplay console itself, be sure to deactivate the previous version of the APK that you had when you upload and release the new one and the warning will go away.
     
  7. nearearthsports

    nearearthsports

    Joined:
    May 28, 2018
    Posts:
    4
    I am having the same issue now and there is no help on Internet without using App bundles
     
  8. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    Did you try following the steps me and @Gustavo-Z suggested? It worked for me. I myself have just run into a severe annoyance with my app getting removed by google and they're claiming I have to have a privacy policy even though I collect no personal information whatsoever and don't have ads and by their own rules as far as I can work out I don't need to put one up because of that.
     
  9. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    6
    Thank you!! Saved me hours of searching!
     
  10. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    Just as an extra note, in regards to the advertising warnings that Google screeches at you about I did some research and found this.

    http://www.zuluonezero.net/2019/02/...-4-8-of-the-developer-distribution-agreement/

    It turns out that google can do some kind of very detailed scans on your APK file when you submit it and there are advertising packages that come in your projects and are installed by default even if you never use them. Google picks this up and then they proceed to whine at you and take down your app. The fix as described in the really helpful blog post is to simply remove any advertising related packages through the package manager and now my app is back up.
     
  11. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    Okay, just a heads up guys, it seems that the stupid advertising problem is so common just following the articles' advice works absolutely fine, google have some sort of blanket requirement where you need to generate a privacy policy even if you don't collect any information whatsoever and it seems to have fixed things now I've put a link in.

    Phew, what an unnecessary annoyance, just to give a bullet point list for newbies so that there's no confusion, here's what you apparently need to do to keep the app up.

    . Follow the instructions me and @Gustavo-Z provided to build a 64 bit version of your android app

    . Create a blanket privacy policy statement using the article I linked which seems to explain everything, if you don't require ads or anything it should be a simple case of "We do not request permissions and put ads on our apps" if you do put stuff on your apps you probably need to be very clear about it and may need to consult a lawyer possibly because they seem to be really paranoid about apps on the googleplay console
     
    Last edited: May 11, 2019
  12. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    Well my app didn't get taken down overnight after following all these steps, so it should all be fine for people now if they update everything according to this thread.
     
  13. rockstarsaad

    rockstarsaad

    Joined:
    Sep 26, 2015
    Posts:
    7
    Hi @Lethn i have follow your steps for fixing the issue of build 64 Bit it giving error and one thing more can you please how i can install the NDK is it required some installation ?
     
  14. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    @rockstarsaad I wouldn't know I'm afraid, what version of Unity are you using? Also, is Android Studio up to date?
     
  15. ericmg123

    ericmg123

    Joined:
    Aug 18, 2016
    Posts:
    3
    Thanks a lot, this helped me get a 64bit compatible version out.
    I had to download a different NDK. When I went to export, Unity popped up a dialogue asking for the NDK. When I chose the one you linked, it declined it and said I needed r-13b, with a button to download it.

    Build took a lot longer than usual, about 15 minutes (vs. 5).
     
  16. PeterJurkovsky

    PeterJurkovsky

    Joined:
    Jan 15, 2015
    Posts:
    10
    I have encountered strange behaviour of Unity (2017.4.17f1).

    I changed Scripting Backend to IL2CPP, checked ARM64 and Build App Bundle checkboxes ..so now Unity wants NDK for building. So I have manually installed ndk-r13b and set the NDK path via Edit->Preferences->External Tools ..but Unity pops up error during build that NDK version is invalid.

    But then I remove NDK path from External Tools preferences (left it blank), I start build and let Unity prompt for NDK folder, I choose the same folder as before and now it magically works! :p
     
    Cromfeli likes this.
  17. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,282
    Hi all. I tried and succeeded in building an app bundle version of my game a while back but i could not find any easy way of getting and testing a generated apk on my device. How do you do this without having to wait an eternity for google play beta builds to propagate through the internet to let you download it?

    Has anyone seen any new issues after switching to an app bundle?
     
  18. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    95
    Download bundletool: https://github.com/google/bundletool/releases

    To use it, open a command line in that directory:

    java -jar bundletool-all-0.9.0.jar build-apks --bundle=BUNDLE_PATH.aab --output=OUTPUT_NAME.apks --ks=PATH_TO_YOUR_KEYSTORE.keystore --ks-pass=pass:PASSWORD_HERE --ks-key-alias="KEY_ALIAS_NAME_HERE" --key-pass=pass:PASSWORD_HERE


    By default it will generate APKs signed with debug.keystore, which is why you can specify the keystore in the command.

    This will create an .apks file, which is just a zip file, if you extract it, you will see the APKs for each architecture in /standalones.
     
    Antony-Blackett likes this.
  19. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,282
    Sounds a little more complicated than the old method of upload to google play, download derived from google play. :(
     
  20. jamie2dog

    jamie2dog

    Joined:
    Jun 21, 2017
    Posts:
    3
    Thank you to all, i changed couple settings as @Gustavo-Z but i only changed ones on the first screen shot, i downloaded and extracted the ndk and then built as normal using internal build not gradle, after a while the build was a success and i was presented with an apk and a symbols zip folder, i uploaded the apk to google play and the 64bit warning was not there anymore.
     
    Lethn likes this.
  21. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    95
    For those that are downloading the Android NDK, make sure you get the correct version that is required for your version of Unity.

    It looks like Unity 2019 will handle this for you when you follow the directions here: https://docs.unity3d.com/Manual/android-sdksetup.html

    For Unity 2017.4, you'll need "Android NDK version r13b (64-bit)" as noted here: https://docs.unity3d.com/2017.4/Documentation/Manual/android-sdksetup.html

    For Unity 2018.4, you'll need "Android NDK version r16b (64-bit)" as noted here: https://docs.unity3d.com/2018.4/Documentation/Manual/android-sdksetup.html

    For other versions of Unity, make sure you check the "Android SDK setup" section of the manual for your specific version of Unity.
     
    BebopTune and farazk86 like this.
  22. seboldsg

    seboldsg

    Joined:
    Apr 10, 2019
    Posts:
    2
    Unity hub -> Installs -> add modules -> use an arrow to open "android build support" and check SDK & NDK.
    This way it will install everything needed by itself :)
     
    BebopTune and Lethn like this.
  23. farazk86

    farazk86

    Joined:
    May 31, 2017
    Posts:
    33
    Judging by these zip files are 700mb+, this is very helpful for users with slow internet connections like myself. Thanks

    To know for sure which version of NDK is needed for your Unity version go to Edit -> Preferences -> External Tools. Here the required NDK version is mentioned.
     
  24. unity_rORY9W8WkfOBnQ

    unity_rORY9W8WkfOBnQ

    Joined:
    Jun 17, 2019
    Posts:
    1
    that helped me
     
    BebopTune likes this.
  25. Nirav20

    Nirav20

    Joined:
    Jul 13, 2016
    Posts:
    2
    @unity_rORY9W8WkfOBnQ i have follow the steps that you are talking in the video but i am facing one issue at the end of building process (i am working on Unity 2017.4.29f ).issues text is as given below.
    "UnauthorizedAccessException: Access to the path "D:\" is denied.
    System.IO.Directory.CreateDirectoriesInternal (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:131)
    System.IO.Directory.CreateDirectory (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:96)
    UnityEditor.Android.PostProcessor.Tasks.ZipIl2cppSymbols.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:272)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) ".
    How can i overcome this issue ? please anyone guide me .
     
  26. rtstudiosco

    rtstudiosco

    Joined:
    Jul 24, 2018
    Posts:
    1
    Someone please help,

    I switched to the IL2CPP scripting backend, I imported the Android NDK from the link @Gustavo-Z provided and I enabled the Android App Bundle option but when I build the project it says it built successfully but it doesn't appear on my desktop where I specified it to build

    I don't know if i'm doing anything wrong or it's something with the version of Unity I am using (2018.3)

    Please let me know
     
  27. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,057
    You may want to upgrade to 2019 if you're having issues, I haven't run into problems on my end after getting everything done.
     
  28. Truemaster

    Truemaster

    Joined:
    Jun 27, 2019
    Posts:
    1
    Hi, I was having the same problem with a more update version of unity and after some research I migrate my project to the most stable version of unity (2017.4 LTS). If you have unity hub , you can download from there. Then I follow the @Gustavo-Z steps and it worked!!
    Be aware when you migrate your project!!
    Also you need to download the right android NDK version for this unity version “ android NDK r13b (64-bit)” , you can find it here:

    https://developer.android.com/ndk/downloads/older_releases.html

     
    Last edited: Jul 26, 2019
  29. Lord_Creon

    Lord_Creon

    Joined:
    May 7, 2019
    Posts:
    1
  30. reguig-abdo

    reguig-abdo

    Joined:
    Apr 23, 2017
    Posts:
    3
    I'm having the same problem. It say it finished successfully, but there is nothing exported
     
  31. pedrock_90

    pedrock_90

    Joined:
    Dec 16, 2015
    Posts:
    2
    Just a quick question, what do you do with the symbols.zip ? did you uploaded to google play or just ignore it ?
     
    franchestermilan likes this.
  32. franchestermilan

    franchestermilan

    Joined:
    Feb 22, 2018
    Posts:
    1
    yeah what do you do with that symbols.zip?
     
  33. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    152
    My case
    full in next thread
    https://forum.unity.com/threads/google-play-x86-deny.729122/

    If I build one APK with only one ARM64 checkbox - then build is complete (can't test on device yet)

    I have uploaded two APKs
    - 32bit-only, versionCode = 1
    http://prntscr.com/oub6yr

    - 64bit-only, versionCode = 2
    http://prntscr.com/oub72q

    .. but google play console complains
    http://prntscr.com/oub6l2

    Please note: We can't build Android App Bundle due to usage of OBB (which is not compatible with Bundle. Do you know another possibility to upload generic binary-file to device, not with obb ?)

    HOW TO FIX? It's SHOW-STOPPER.
     
    Last edited: Aug 18, 2019 at 9:11 PM
    chuck666 likes this.
  34. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    152
    Unity 2018.4.6f1 (64-bit)
    I have installed android-ndk-r16b (not 13b), and compile successfully.
    Why do you recommend 13b ?
     
  35. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    691
    When I download NDK and other things as per mentioned in above links and I try to connect Unity Editor with new downloaded NDK - I am getting this kind of error message:

    NDK_Unity_Error.png

    Unity downloaded NDK file not working with Play store upload.
     
  36. chuck666

    chuck666

    Joined:
    Sep 29, 2016
    Posts:
    5
    Same issue as you guys!!! @AlexHell

    Please Help!!!