40

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.

10
  • Have you checked player settings if x64 is checked or not ? Aug 20, 2019 at 6:02
  • In my case I checked, but still
    – letonai
    Aug 20, 2019 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"? Sep 12, 2019 at 20:34
  • 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, 2019 at 0:17

11 Answers 11

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.

1
  • 1
    just like this, on build.gradle it will be disable 32 bit architecture ndk {abiFilters 'armeabi-v7a','arm64-v8a' } Sep 17, 2020 at 16:00
16

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

enter image description here

2
  • I have all three options ticked (ARMv7, ARM64, x86) but still i get the same error. How to fix?
    – Anish Arya
    Jan 4, 2020 at 12:24
  • 2
    @AnishArya uncheck the x86 option.
    – Saadi
    Jan 8, 2020 at 18:54
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'

4

Add this

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

in build.gradle(Mobile:app) file

4
  • 1
    Your answer would be better if you could add some context to the change you're proposing.
    – David Buck
    Nov 19, 2019 at 14:12
  • @DavidBuck I agree. Apr 29, 2020 at 7:33
  • @KhurshidAnsari what did you do to make it work? Nov 29, 2020 at 17:24
  • I already tried and it's not working, you have to fully remove Intel architecture support (x86 and x86 64 bit).
    – Acemond
    Apr 15, 2021 at 7:29
2

for now it is working with removing x86 architecture

0
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.

1
  • I deselected x86 but the problem still exists.
    – Anish Arya
    Jan 4, 2020 at 12:51
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

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.

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'
0

remove this line from build.gradle

    packagingOptions {
    exclude "lib/arm64-v8a/librealm-jni.so"}

Not the answer you're looking for? Browse other questions tagged or ask your own question.