APKs or App Bundles are available to 64-bit devices but they only have 32-bit native code
Asked Answered
P

11

43

I have exported an Android App Bundle file to upload at Play store with NDK downloaded from Unity desired location because Android Studio NDK file is not compatible with Unity.

I got this kind of error message when I upload the build:

Screen Shot

Here you have SDK and NDK path setup:

Screen Shot

Now, what is the solution for this?

What step I did wrong that I can't able to understand?

Please don't mention about the duplicate question because I have tried other options they didn't work for me.

Poetics answered 19/8, 2019 at 18:3 Comment(10)
Have you checked player settings if x64 is checked or not ?Sixfooter
In my case I checked, but stillProteolysis
Hey, I'm facing the same issue here! As many people suggest disabling the 86bit build makes that particular warning go away, but then I get another one about a huge drop in device availability! from 600+ tablets to 144, also decrease on phone and tv :( that is very undesirable! Have anyone been able to make google understand that when having both ARM64v and x86 is selected there IS in fact a 64bit version - and not "only a 32bit version"?Fleabitten
i found the solution to this, Try This. https://mcmap.net/q/390868/-xamarin-this-release-is-not-compliant-with-the-google-play-64-bit-requirementCarnallite
@RasmusPuls that's not true. ARM64 is not the 64bit version of x86. Its a different architecture. You need x86_64 if you want to support x86.Counseloratlaw
@TedBigham x86_64 is not an option in the unity build settings (from where I am building). There are checkboxes for each architecture that you want to include in your target, the available options are: "ARMv7", "ARM64" and "x86". I have checked both ARM64 and x86, so they should both be included. Nobody is saying that ARM64 is the 64bit version of x86.Fleabitten
@RasmusPuls You said "when both ARM64v and x86 is selected there IS in fact a 64bit version". That not true for EACH PLATFORM in your APK, which is what Google requires. You can't run ARM64 on x86_64 devices, so those 600+ tables still wouldn't be able to run your game.Counseloratlaw
@TedBigham Okay fair, there is clearly something fundamental I don't understand about the build process here. So which architecture is in my build when I have checked both ARM64 and x86? And, do you think I would be able get rid of the google play warning with the target architecture options that unity provides? Please see the picture below that someone posted at Nov 05.Fleabitten
@RasmusPuls At the top level there are 2 android instruction sets: ARM and x86. Each of those have 32bit and 64bit versions. If you select ARM64 and x86, you have the 64bit ARM and the 32bit x86. Google wont accept the 32bit one unless it also has 64bit one for the same instruction set. If you must support x86 android you'd have to do something outside of the normal build process to add the 64bit libraries. Unity won't do it with any combination of options.Counseloratlaw
@TedBigham Thank you sir for the explanation. I will move over to unity forums and ask what people there how that get around this.Fleabitten
P
31

For future reference:

It's an issue with google play and x86 build that do not offers a 64bit counterpart code. Disabling x86 build fix this issue.

Reference: https://forum.unity.com/threads/successful-unity-aab-build-not-compliant-with-the-google-play-64-bit-requirement.729035/

The problem started on 08/20/2019.

Proteolysis answered 20/8, 2019 at 14:0 Comment(1)
just like this, on build.gradle it will be disable 32 bit architecture ndk {abiFilters 'armeabi-v7a','arm64-v8a' }Engrail
T
16

Make sure Edit > Project Settings > Player > Configuration > Scripting Backend is set to IL2CPP and Target Architectures > ARM64 is ticked.

enter image description here

Tack answered 5/11, 2019 at 11:1 Comment(2)
I have all three options ticked (ARMv7, ARM64, x86) but still i get the same error. How to fix?Fraga
@AnishArya uncheck the x86 option.Magenta
K
4

I had the same issue, and indeed it was the fault of uploading with wrong 'Supported architectures' selected.

STEP 1

So now I have my architectures selected like this Supported architectures - Visual Studio 2019 Community / Xamarin Forms

but before I had 'x86' checked as well. It's not wrong to have it checked, but I learned that in that case you need to have 'x86_64' checked as well. Just like you need 'arm64-v8a', if you have 'armeabi-v7a'

Anyway I fixed that, rebuilt the solution (using Xamarin Forms in Visual Studio 2019 Community), archived it and uploaded to Google Play Console. It did not work!

STEP 2

I figured I need to change 'Version name' (from 1.0.0.0 to 1.0.0.1) for it to work, but to no avail.

I lost half a day, until I found this

versionCode — A positive integer used as an internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users; that number is set by the versionName setting, below. The Android system uses the versionCode value to protect against downgrades by preventing users from installing an APK with a lower versionCode than the version currently installed on their device.

on Android developer site.

So I turned 'Version name' back to 1.0.0.0 and upped 'Version number' (VS19C/XamarinForms alias for 'Version code') to 2, rebuilt, archived and uploaded to Google Play Console and I was almost there, but not there yet.

STEP 3

Rollout was succesful only after I clicked 'Remove' next to the APK with 3 supported architectures, leaving me with only the last uploaded APK, which had only 2 supported architectures.

Now we're in 'Full roll-out'

Kayceekaye answered 21/10, 2019 at 8:51 Comment(0)
S
4

Add this

ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

in build.gradle(Mobile:app) file

Shaunda answered 19/11, 2019 at 13:52 Comment(4)
Your answer would be better if you could add some context to the change you're proposing.Child
@DavidBuck I agree.Acherman
@KhurshidAnsari what did you do to make it work?Parity
I already tried and it's not working, you have to fully remove Intel architecture support (x86 and x86 64 bit).Foundation
I
2

for now it is working with removing x86 architecture

Integumentary answered 24/9, 2019 at 17:47 Comment(0)
P
1

I got this kind of clear and simple reply from Unity Support Person on my Unity Forum post and this worked for me:

APKs or App Bundles are available to 64-bit devices but they only have 32-bit native code

Here is the snapshot for the reply: enter image description here

I hope now, this becomes easy to solve this problem.

Poetics answered 28/8, 2019 at 13:47 Comment(1)
I deselected x86 but the problem still exists.Fraga
G
1

remove this line from build.gradle

    packagingOptions {
    exclude "lib/arm64-v8a/librealm-jni.so"}
Ganges answered 13/7, 2022 at 18:14 Comment(0)
P
0

I'm having exactly same problem with an update for my game... I just checked my bundle, and for I could see I have the 64bit code there... enter image description here

Proteolysis answered 19/8, 2019 at 22:54 Comment(0)
A
0

Okay, Guys here is the solution to the problem. Open Unity Hub. Click on "Installs" and you'll see all the install versions of unity on your system. On Top Right of the, each Unity Version installed there are three vertical dots, click on them and choose "Add Modules". The Very First Option is "Android Build Support", expand it and choose "Unity SDK & NDK Tools". What it will do now, it will install the SDK and NDK which support the particular version of unity you are using. After completion of Downloading and installation. Open Unity Editor. Choose Unity > Preference> External Tools and browse for the SDK and NDK you just downloaded and installed. The location is as below, Navigate to the location where Unity is installed and choose Unity > Hub >Editor> Unity(Version, you installed NDK and SDK for) >Playback Engine > ANdroid Player > NDK/SDK.

You are all set now.

Now what you have to do this to go into Player Setting> other settings > Target Architecture > Choose ARMv7 and ARMv64(this is necessary).

Build the APK and you are all set. Accept the answer if it solves your issue. Cheers.

Arawakan answered 10/5, 2020 at 21:52 Comment(0)
A
0

I resolved this issue by updating to the newest OPENCV Framework from https://opencv.org

I replaced the sdk file in the jni folder from the latest OPENCV Sdk And also updated my libs and obj folder to support 64-bit support.

Awakening answered 30/6, 2020 at 19:44 Comment(0)
B
0

If you are using Android Studio with Gradle,

Add

ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' 

to your gradle file like below,

android {
   compileSdkVersion 27
   defaultConfig {
       appId "com.google.example.64bit"
       minSdkVersion 15
       targetSdkVersion 28
       versionCode 1
       versionName "1.0"
       ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
Bugle answered 16/9, 2020 at 8:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.