How to set CPU architecture in APK for Google Play - android

I have created an application for android in DELPHI XE8. If I want to publish it on Google Play and Google it shall be categorized device platforms ARMEABI, ARMEABI-V7A, MIPS and x86 while DELPHI XE8 (as well as all previous versions) only supports architecture ARMEABI-V7A.
Do not come to me as a professional publishing application on Google Play that your application installs and someone will message to him that the platform is not supported.
Analysis APK installation package generated DELPHI XE8 I discovered that it is automatically generated for all of the above platforms.
Google on its website (http://developer.android.com/google/play/filters.html) recommends solutions using Android NDK - unfortunately, I still could not figure out how to do that ...
As another solution is recommended to read and edit ANDROID.mk (unfortunately, this file does not generate DELPHI XE8).
The question is how to achieve that DELPHI XE8 compiled APK file only for ARMEABI-V7A?
Anyone have any experience or a solution to this problem?

So I found a solution and it's very simple and plain:
Simply in DELPHI XE8 menu Project -> Deployment (section RELEASE CONFIGURATION - ANDROID PLATFORM) uncheck these items:
$(BDS)\lib\android\Release\x86\
$(BDS)\lib\android\Release\mips\
$(BDS)\lib\android\Release\armeabi\
and let checked this item
Android\Release\ (remote path is library\lib\armeabi-v7a)
perform Build application and then Deploy.
From now on Google Play displays only supported devices to the native platform ARMEABI-V7A.

Related

How to generate Android App Bundle with C++ builder 11.2?

I can not figure how to generate an Android App Bundle with C++ builder 11.2.
At this stage, I'm just checking all the steps of an android app creation, from scratch up to Google Play beta testing.
For this purpose, I wrote a very simple piece of code (one TButton with one TLabel).
I compiled the code with the following options:
platform android 32bits
SDK API 31 32bits
release
configuration development
C++ builder generates an APK which runs smoothly on my phone which is great!
My next step is to download the app on the Google Play store. I have created a Google Play store developer account for this test however I'm stuck as I can not upload the apk file as Google Play accepts Android App Bundle files only.
I have googled and found some information about generating AAB files with Delphi and the Android 64 platform here https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Submitting_Your_Android_App_to_Google_Play however I can not duplicate this with C++ builder 11.2
There is no 64bits android platform available (despite the 64bits SDK being installed) and I can not find any relevant option in the project options related to AAB files.
I have also compiled the app with the "Application Store" option but I could not find any AAB file in my project.
What am I doing wrong?
C++Builder 11.2 does not compile for 64-bit Android. See Supported Target Platforms.
There is an open RSP ticket about this: RSP-24562: 64-bit Android C++
I believe this is as a major weakness with the current RAD Studio development system, and I would suggest all users encourage Embarcadero to get the Android 64-bit C++ compiler up and running.

How to make APK compliant with Google Play 64-bit Requirement?

I know this question has been asked before, but I am still struggling to find a functioning answer on how to properly achieve this. When I upload our APK to the Google Play dev console, I get the following warning:
Our application uses three jniLibs that fall into the following architectures: arm4-v8a, armeabi-v7a, and x86. Clicking the Learn More link attached to the error gives the following solution to this problem:
However, adding this ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86' in my default config in my build.gradle stills gives the same error referenced above. I am kind of lost on this as I am following what Google recommends and would appreciate any help on the matter.
Here's some additional information:
APK Analyzer Results
I am building a signed APK using the V2 (Full APK Signature).
Removing the x86 jniLib allows me to upload the APK to the Google Play store with zero errors, however, then I am unable to run the Android Emulator because the AVDs only support x86.
An optimal solution would either be: Upload the to the playstore with the x86 support without encountering any errors or upload to the Playstore without the x86 library and still be able to run the emulator within Android Studio. Any ideas?
I'd see two whole other options there ...
A) You'd have to exclude that Epson native assembly for x86 from the release build... because when x86 is present, it will also demand x86_64. I'd assume it is there for x86 emulation, but for debug builds this isn't the problem. Removing it and using a slow ARM emulator might not be the answer. Try adding this into buildTypes.release (in order to keep it for debugging purposes):
packagingOptions {
exclude "lib/x86/*.so"
}
B) Seiko Epson would meanwhile offer native assembly for x86_64 ...if you'd update their SDK.
Technically speaking, option A would be a whole lot better, because of a smaller package size.
Google Play Console states that if you support a 32-bit architecture, you must also support the corresponding 64-bit version.
I see two options:
Provide the x86_64 versions of your libs.
Remove the x86 version of your libs and use an arm architecture AVD system image, which are available.

Error while uploading unity app to Play Store

I have made a game for Android. I have develop and built it in Unity but when I try to distribute the game to the play store I get the following 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: 3.
Include 64-bit and 32-bit native code in your app. Use the Android App Bundle publishing format to automatically ensure that each device architecture receives only the native code it needs. This avoids increasing the overall size of your app. Learn More
Can someone help with this?
In the Player Settings window, under the Other Settings tab, there are checkboxes for what target architectures your app supports. Uncheck the x86 one, if it's there (that depends on your Unity version), and make sure both ARMv7 and ARM64 are checked.
For x86, Unity supports only 32 bits. So if you check that target, the Play Store will complain that no 64 bits version is provided for the x86 platform.

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.

Googleplay don‘t filter x86 device

I generated a .so file which is builded by using ndk-build command. And in the Application.mk file,i writed these: APP_ABI := armeabi. Then, I used this .so file in another app, but I figured it out that the app is visible in Google play with an x86 device.
From the docs (http://developer.android.com/google/play/filters.html): By including native libraries built with the Android NDK that target a specific CPU architecture (ARM EABI v7 or x86, for example).
Now I'm confused, what should i do to make my app invisible to x86 device in GooglePlay?
We have an application published in GooglePlay,the application will crash in x86 device. So we want to make the application invisible for x86 device in GooglePlay. Now we have our .so file in armeabi directory under jniLibs directory, but x86 device still can find the application in GooglePlay.
Google Play may be depending on the fact that x86 has a translation layer which will take armeabi code and translate to x86. See: How does native android code written for ARM run on x86?
While I don't know why your particular app won't work on x86, one way to handle it is to check the CPU/Architecture when you app starts up via the old
Build.CPU_ABI
or on API 21 and up
Build.SUPPORTED_ABI
http://developer.android.com/reference/android/os/Build.html#CPU_ABI
and prevent the user from running your app if a condition isn't met like CPU architecture. So on launch you would check and if the device isn't correct degrade with a dialog and/or prevent the user from accessing the feature which would crash.
EDIT
If you are required to block devices from even seeing your app, you'll have to use the Google Play Developer console to select what devices can see your app.
See: How to restrict android app to specific device make?
and https://support.google.com/googleplay/android-developer/answer/1286017?hl=en
Of course as new x86 devices come online you'll have to remove them as well.

Categories

Resources