41

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.

Sham Dhiman
  • 1,348
  • 1
  • 21
  • 59
Siddharth
  • 4,142
  • 9
  • 44
  • 90
  • Have you checked player settings if x64 is checked or not ? – Bhavin Panara Aug 20 '19 at 06:02
  • In my case I checked, but still – letonai Aug 20 '19 at 13:44
  • 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"? – Rasmus Puls Sep 12 '19 at 20:34
  • i found the solution to this, Try This. [https://stackoverflow.com/questions/56026974/xamarin-this-release-is-not-compliant-with-the-google-play-64-bit-requirement](https://stackoverflow.com/questions/56026974/xamarin-this-release-is-not-compliant-with-the-google-play-64-bit-requirement) – Sayed Muhammad Idrees Sep 23 '19 at 11:38
  • @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. – Ted Bigham Nov 11 '19 at 18:29
  • @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. – Rasmus Puls Nov 12 '19 at 11:36
  • @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. – Ted Bigham Nov 12 '19 at 15:38
  • @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. – Rasmus Puls Nov 13 '19 at 09:50
  • 2
    @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. – Ted Bigham Nov 14 '19 at 00:17
  • @TedBigham Thank you sir for the explanation. I will move over to unity forums and ask what people there how that get around this. – Rasmus Puls Nov 14 '19 at 08:36

11 Answers11

28

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.

letonai
  • 506
  • 4
  • 6
16

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

enter image description here

magicode118
  • 1,444
  • 2
  • 17
  • 26
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'

s3c
  • 1,481
  • 19
  • 28
4

Add this

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

in build.gradle(Mobile:app) file

David Buck
  • 3,752
  • 35
  • 31
  • 35
2

for now it is working with removing x86 architecture

Dhanu
  • 116
  • 2
  • 3
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.

Siddharth
  • 4,142
  • 9
  • 44
  • 90
1

remove this line from build.gradle

    packagingOptions {
    exclude "lib/arm64-v8a/librealm-jni.so"}
Ali Najaphi
  • 151
  • 2
  • 8
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

letonai
  • 506
  • 4
  • 6
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.

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.

Jasmine John
  • 873
  • 8
  • 12
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'
Shanika Tharanga
  • 144
  • 1
  • 10