armeabi-v7a,arm64-v8a,x86和有什么不一样? [英] What is the difference between armeabi-v7a, arm64-v8a, x86?

查看:350
本文介绍了armeabi-v7a,arm64-v8a,x86和有什么不一样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Kivy开发Android应用.我正在使用Buildozer来编译APK文件.在Buildozer规范文件中,有一个设置 android.arch = armeabi-v7a ,我不明白.

I am working on an Android App on Kivy. I am using Buildozer to compile an APK file. In the Buildozer spec file, there's a setting android.arch = armeabi-v7a, I didn't understand this.

此外,当我使用命令 buildozer -v android debug 生成APK文件并使用命令 adb install bin/< appname> .apk 将其安装时-它没有在我的Android手机上打开.

Also, when I generated the APK file using the command buildozer -v android debug and installed it using the command adb install bin/<appname>.apk - it didn't Open on my Android Phone.

推荐答案

这些是CPU指令集.通常,您不必担心,默认设置很好,但是由于最近的一些更改,我一直想在文档中添加一些内容.

These are CPU instruction sets. Mostly you don't have to worry about it, the default is fine, but I've been meaning to add something to the docs about it due to some recent changes.

基本上,给定的Android设备可能具有机械臂或x86 cpu(甚至其他功能,但这并不重要),这些只是来自不同制造商的不同体系结构类型.Arm cpus是最常见的,但x86并不罕见.编译代码时,输​​出取决于体系结构目标.当您构建Kivy应用程序时,您可以指定一种架构,然后该应用程序只能在该类型的设备上运行.如果您想支持所有设备,则可以编译多个APK进行分发-Play商店可让您上传多个APK,并将正确的设备发送给每个设备.

Basically, a given Android device might have an arm or an x86 cpu (or even something else but that's not important), these are just different architecture types from different manufacturers. Arm cpus are most common, but x86 is not unusual. When you compile code, the output depends on the architecture target. When you build a Kivy app, you specify one of the architectures and then the app will only work on that type of the device. If you want to support all devices, you can compile multiple APKs to distribute - the Play store will let you upload more than one, and will send each device the right one.

在给定的体系结构类型中,有多个版本.armeabi-v7a是较旧的目标,对于32位arm cpus,几乎所有的arm设备都支持该目标.arm64-v8a是更新的64位目标(类似于台式机中的32位-> 64位转换).我认为大多数新设备都是64位的,但不确定.arm64-v8a设备可以运行针对armeabi-v7a编译的代码,它向后兼容.

Within a given architecture type there are multiple versions. armeabi-v7a is the older target, for 32 bit arm cpus, almost all arm devices support this target. arm64-v8a is the more recent 64 bit target (similar to the 32-bit -> 64 bit transition in desktop computers). I think most new devices are 64 bit, but not sure. arm64-v8a devices can run code compiled against armeabi-v7a, it's backwards compatible.

从今年晚些时候开始,Play商店将要求您至少上传一个arm64-v8a APK,因为这会为较新的设备提供最佳支持.您还可以上传其他APK以支持其他设备类型.

As of later this year, the Play store will require you to upload an arm64-v8a APK as the minimum, because this gives the best support for newer devices. You will also be able to upload other APKs to support other device types.

这还不是完整的故事:某些x86设备具有一个特殊的库,该库可让它们运行为arm设备编译的代码.我不确定这有多广泛,但这似乎很普遍.

That isn't quite the full story: some x86 devices have a special library that lets them run code compiled for arm devices. I'm not sure how widespread this is, but it seems pretty common.

对于您的应用程序问题,请使用 adb logcat 来查找问题所在.

For your app issue, use adb logcat to see what's wrong.

这篇关于armeabi-v7a,arm64-v8a,x86和有什么不一样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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