Android: how to test for 64-bit device compatability - android

I was getting this warning in google play. This release is not compliant with the Google Play 64-bit requirement. The following APKs or App Bundles are available to 64-bit devices, but they only have 32-bit native code
I noticed that my apk had only x86, x86_64, armeabi_v7a folders. So I updated the gradle build script and now I have arm64-v8a folder as well. I see all the .so in armeabi-v7a generated in arm64 too.
How can I validate that this will support 64 bit devices

You can create an emulator with 64 bit image, to see that the app works on it.
Also, in your build variants, you can choose which active abi to use:

Related

Cannot upload multiple APKs targeting multiple CPU architectures on Google Play Developer Console

I have built a game in Unity Android.
I want to upload multiple APKs targeting different CPU architectures in Google Play Developer Console.
Targeting 64 bit CPU architecture is compulsory, we cannot publish apps without targeting 64-bit architecture. I have uploaded APK targeting ARM64 CPU architecture and rolled it out to production successfully.
Now the problem is that I want to add APKs targeting ARMv7 (32-bit) and x86 CPU architectures.
For that, I have:
Created New Release.
Uploaded APK that targets ARMv7 with different Version code.
I have retained previous APK that was targeting ARM64 so that current release will offer 64-bit version for 64-bit devices.
Now when I Proceed to Review I am getting errors
Error
This release is not compliant with the Google Play 64-bit requirement
The following APKs or App Bundles are available to 64-bit devices, but they only have 32-bit native code: 8.
Fully shadowed APK
Problem:
This APK will not be served to any users because it is completely shadowed by one or more APKs with higher version codes.
Here is the Screesnhot:
It is saying that I need to include support for 64-bit architecture. But I have already uploaded APK previously for the same. I cannot upload ARMv7 and x86 versions of the app.
Starting August 1, 2019, your apps published on Google Play will need to support 64-bit architectures. 64-bit CPUs deliver faster, richer experiences for your users. Adding a 64-bit version of your app provides performance improvements, makes way for future innovation, and sets you up for devices with 64-bit-only hardware.
Source: Support 64-bit architectures
If you are using a version of Unity that supports 64-bit Android libraries, you can generate a 64-bit version of your app by adjusting your build settings. You will also need to use the IL2CPP backend as your Scripting Backend (details here). To set up your Unity project to build 64-bit architecture, do the following:
Go to Build Settings and ensure you are building for Android by
verifying that the Unity symbol is next to Android under Platform.
If the Unity symbol is not next to the Android platform, select
Android and click Switch Platform.
Click Player settings.
Player settings in Unity
Navigate to Player Settings Panel > Settings for Android > Other
settings > Configuration
Set Scripting Backend to IL2CPP.
Select the Target Architecture > ARM64 checkbox.
set target architectures in Unity
Build as normal!
You should provide bigger bundle version code for more enchansed apk.
In this case arm64 Version Code must be 8, and arm-v7 Version Code is 7.
This is because the "device" is looking for the first matching APK with the highest Version Code. And since arm64 cpu support arm-v7, then in your case they will all receive the arm-v7 version, since its Version is higher, ie it hides the assembly for arm 64.

How do you convert a 32bit android apk to a 64bit apk without the original code?

Google now requires all apks to support 64bit and we've got an issue due to that.
We only have the apk that was once developed for us and we use a script that includes apktool to brand it and update the version control number, when we receive an update (which we don't get anymore).
Now in the lib folder, that appears when you profile/debug APK, we see three folders:
x86
arm64-v8a
armeabi-v7a
Our understanding is that arm64-v8a is the 64 bit version, but we still get the notice that we're not 64bit compliant when uploading to the google play console. Including the error that the API level is 27 and not 28, can this also be modified when you only have the apk?

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

I have an android app which I am trying to upload to Google Play Console.
After analyzing the apk, I can find the same .so files in x86, arm64-v8a and armeabi-v7a folders.
I don't have a x86_64 though.
But still, when I upload my apk to google play console, I get this error:
APKs or App Bundles are available to 64-bit devices, but they only
have 32-bit native code
I have followed the documentation to add
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
in my build.gradle file, but that doesn't the structure of the apk.
This is how my analyzed apk looks like:
Please help.
The Agora SDK unfortunately does not support x86_64, which means you'll need to drop support for x86 altogether to be able to upload to the Play Console. Remove 'x86' and 'x86_64' from the list of abiFilters.
At the same time, I would recommend reaching our to the SDK developers to ask them to add support for it so you don't lose on potential users.

cordova build releases 5 apk which to upload

I am trying to build an android app using cordova 8. As soon as cordova build android --release with keystore.
It releases 5 apk file in 5 folder, but I am not sure, which one to upload:-
arm64
armeabi
armv7
x86
x86_64
Now, I am not sure, which one to release and upload for google play after signing.
Are you using a plugin containing native libraries? (I'm still using version 6 of Cordova and have only one apk, so either it's new in earlier versions or it's something to do with your project).
The different APKs you're seeing are to support different processors on the devices.
Most devices use armv7 so that's probably the one you want to upload first, but you can upload all the apks to google play.
It you upload only one (ore some) of the APKs, your app will be compatible only with device using corresponding kind of processor.

How do I know what target Architectures to choose?

I am building my Xamarin.Android project and I have selected AOT compilation which has bloated my .apk to 165mb.
To get my .apk size down I am looking at the target architectures, currently I target:
armeabi, armeabi-v7, x86, arm64-v8a
But I have no idea how these architectures correspond to modern devices.
I have read Android CPU Architectures and it says:
Xamarin.Android defaults to armeabi-v7a for Release builds. This
setting provides significantly better performance than armeabi. If you
are targeting a 64-bit ARM platform (such as the Nexus 9), select
arm64-v8a. If you are deploying your app to an x86 device, select x86.
If the target x86 device uses a 64-bit CPU architecture, select
x86_64.
Therefore do I need to target armeabi and armeabi-v7?
what archetectures should I target for a modern Android tablet and phone?
armeabi is for older devices as most newer devices run armeabi-v7. Secondly, 64 bit devices can fallback to other ABIs. If you're concerned about the size, then your best choice is to create multiple apks:
https://developer.xamarin.com/guides/android/application_fundamentals/cpu_architectures/#Targeting_Multiple_Platforms
Although Google recommends a single APK, this is not always the case:
Although we encourage you to develop and publish a single APK that supports as many device configurations as possible, doing so is sometimes not possible. To help you publish your application for as many devices as possible, Google Play allows you to publish multiple APKs under the same application listing. Google Play then supplies each APK to the appropriate devices based on configuration support you've declared in the manifest file of each APK.
https://developer.android.com/google/play/publishing/multiple-apks.html

Categories

Resources