問題描述
我正在 Kivy 上開發一個 Android 應用程序.我正在使用 Buildozer 編譯一個 APK 文件.Buildozer spec文件里有一個設置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/.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 設備可能有一個 arm 或一個 x86 cpu(或者甚至是其他東西,但這并不重要),這些只是來自不同制造商的不同架構類型.Arm cpus 是最常見的,但 x86 并不罕見.編譯代碼時,輸??出取決于架構目標.當您構建 Kivy 應用程序時,您指定其中一種架構,然后該應用程序將僅在該類型的設備上運行.如果您想支持所有設備,您可以編譯多個 APK 來分發 - Play 商店可以讓您上傳多個,并且會為每個設備發送正確的一個.
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 cpu,幾乎所有 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 有什么區別?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!