Android 应用程序,如何支持 64 位架构?

标签 android architecture 64-bit lib

上次我在 Play 商店发布我的应用的新版本时,它显示了这个警告:This release is complaint with the Google Play 64-bit requirement.

根据 Android 开发者网站:Support 64-bit architectures

Look for native libraries using APK Analyzer

  1. Open Android Studio, and open any project.

  2. From the menu, select Build > Analyze APK…

  3. launch APK analyzer

  4. Choose the APK you wish to evaluate.

  5. Look within the lib folder, which is where you will find any '.so' files. If you can not find any '.so' files in your app at all, then your app is already ready and no further action is required. If you see armeabi-v7a or x86, then you have 32-bit libraries.

应用程序的所有代码都是用 Java 编写的,但我使用了一些库。

问题是我没有看到 lib 文件夹,按照上述步骤操作后。 The folders that I see

最佳答案

可能您的一个(或多个)库包含 native 二进制文件,但它们不支持 64 位架构。 您可以通过获取您的 apk 文件并解压缩它来检查这一点(例如,您可以重命名为 .zip 然后解压缩)。

在 zip 中,打开 lib 目录,并检查其内容。 64 位版本应位于 arm64-v8ax86_64 目录中。据我所知,Android 只查找 ARM 版本,如果缺少该版本,则会显示警告。您通常可以从 lib 中其他目录中的 native 文件名中找出哪些依赖项包含这些文件。 通常将该库更新到最新版本就足够了,否则您可能需要寻找替代方案。

关于Android 应用程序,如何支持 64 位架构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59117461/

相关文章:

c - x64 兼容的 C 源代码

android - 我应该使用 PopupWindow 或 DialogFragment 来接受输入吗?

c# - 关于导出到 MS Project 的架构问题

oop - 与 OOP(或其他范式)相比,ECS(实体-组件-系统)架构模式有哪些缺点?

architecture - 软件设计/体系结构问题

c - 32位变量的右移操作

.NET 堆栈内存限制

Android、scala 和 eclipse = 不稳定的混合

android - 框架 'shared.framework' 缺少此目标 : arm64. Xcode 12.0 kotlin 1.4.10 所需的一个或多个架构

android - Android 6.0使用lockNow后如何保留指纹解锁?