Android工作室用于生成1发布apk,现在它是3.他们每个人都做什么? [英] Android studio used to generate 1 release apk, now it's 3. What does each of them do?

查看:1700
本文介绍了Android工作室用于生成1发布apk,现在它是3.他们每个人都做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我还没有发布。 Android Studio只用于生成一个apk,这是一个发布版本。这次它生成了3个如下所示的内容:

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

I我会假设我想为Google Play商店使用通用商品。

但是有人可以分解每个商品的细节吗?

解决方案

生成的apks每个都针对特定的CPU架构。它们通常是在apk内使用本地库时生成的(详见 Add C和C ++代码到您的项目)。您可以在 ABI管理中阅读它,这里摘录如下:


不同的Android手机使用不同的CPU,这反过来又支持
不同的指令集。 CPU和指令
的每种组合都有其自己的应用程序二进制接口(即ABI)。 ABI
以非常精确的方式定义应用程序的机器代码是如何在运行时与系统交互的
。您必须为每个希望与您的应用程序配合使用的CPU架构指定
ABI。


除了 app-universal-release.apk



app-armeabi -v7a-release.apk 用于 v7-a ARM devices



app-x86-release.apk 用于x86或IA-32


$ b

app-universal-release.apk 包含app中的特定指令 - armeabi-v7a-release.apk app-x86-release.apk



你可以使用普通的,但如果生成的apk太大,你可能不会使用它。用户倾向于避免在Play商店中使用大型应用程序。所以,为了克服这个问题,你需要打破apk到一个特定的apk,所以导致的apk更小。

如果您不想使用通用版,那么您需要将每个特定apk上传到Play商店。当用户访问Play商店中的应用程序时,他/她将获得与他/她的设备CPU类型匹配的特定apk。


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?

解决方案

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.

这篇关于Android工作室用于生成1发布apk,现在它是3.他们每个人都做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆