Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio used to generate 1 release apk, now it's 3. What does each of them do?

So I haven't released in a while. Android Studio used to generate only one apk, which was a release version. This time it generated 3 like the following:

1.app-armeabi-v7a-release.apk
2.app-x86-release.apk
3.app-universal-release.apk

I'm going to assume that I want to use the universal one for the Google Play Store.
But can someone break down the specifics of each one?

like image 454
huey77 Avatar asked Sep 15 '17 14:09

huey77


People also ask

How do you generate a release APK?

In the menu bar, click Build > Generate Signed Bundle/APK. In the Generate Signed Bundle or APK dialog, select Android App Bundle or APK and click Next. Below the field for Key store path, click Create new. On the New Key Store window, provide the following information for your keystore and key, as shown in figure 2.

How is an Android APK created?

Creating an APK file First, open up your project or application that you want to import into an APK file. Then, select Build > Build Bundle(s)/APK(s) > Build APK(s) from the toolbar menu. Android Studio will take a few moments to generate an APK file.

What is app release APK?

With a release, you can manage your app's Android App Bundle (or APK for apps created before August 2021) and then roll out your app to a specific track.


1 Answers

The generated apks each is for specific CPU Architecture. They usually are generated when using a native library inside the apk (more at Add C and C++ Code to Your Project). You can read about it in ABI Management, here the excerpt:

Different Android handsets use different CPUs, which in turn support different instruction sets. Each combination of CPU and instruction sets has its own Application Binary Interface, or ABI. The ABI defines, with great precision, how an application's machine code is supposed to interact with the system at runtime. You must specify an ABI for each CPU architecture you want your app to work with.

Each will contain specific instruction for the Architecture, except the app-universal-release.apk.

app-armeabi-v7a-release.apk is for v7-a ARM devices

app-x86-release.apk is for "x86" or "IA-32"

app-universal-release.apk contains both of the specific instruction in app-armeabi-v7a-release.apk and app-x86-release.apk

You can use just the universal one, but you probably will not want to use it if the generated apk is too big. User tend to avoid a big application in the play store. So, to overcome this, you need to break the apk to a specific one so the resulted apk is smaller.

If you don't want to use the universal one, then you need to upload each of the specific apk to the Play Store. When user visit the application in the Play Store, he/she will be served with the specific apk matching with his/her device CPU type.

like image 175
ישו אוהב אותך Avatar answered Sep 30 '22 14:09

ישו אוהב אותך