如何将Android应用程序编译为64位

Ang*_*Koh 5 64-bit android

我碰到一篇文章说,到2019年8月所有应用程序都必须是64位的

https://www.engadget.com/2017/12/19/android-apps-must-have-64-bit-support-by-august-2019/

根据谷歌,我发现以下部分

https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

2019年需要64位支持
为了预期将来仅支持64位代码的Android设备,Play控制台将要求具有本机库的新应用程序和应用程序更新除了提供32位版本外,还必须提供64位版本。它可以在单个APK内,也可以作为已发布的多个APK之一。

因此已确认需要新的应用程序才能提供64位版本。

现在我该如何编译一个64位版本的应用程序?Android Studio上是否有任何复选框可供我选择以将应用制作为64位?

Nic*_*cue 11

此更改仅影响使用“本机代码”的应用程序,即使用设备或本机上的处理器编译的代码,而不是用Java或Kotlin编写的代码。

这仅对以下情况适用:

  • 您已经使用Android NDK编写了此类本机代码(可能是C或C ++)
  • 您使用具有本机代码的第三方库

If the former, then you should know how to target more processors (See this page). If the latter then you will need to talk to the developer of the third party library.

This article on the Android developer documentation site provides a good overview of how to identify whether your app is 64-bit compliant and what you need to do in case it is not.