[英]64 bit version issue in react-native android app by google play store
According to https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html :根据https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html :
In August 2019, Play store will require that new apps and app updates with native libraries provide 64-bit versions in addition to their 32-bit versions. 2019 年 8 月,Play 商店将要求新应用和带有本机库的应用更新除了提供 32 位版本外还提供 64 位版本。
I have a React Native application (which includes native code).我有一个 React Native 应用程序(包括本机代码)。 My question is how can I know whether a third party library I'm using or even my own code is not supporting 64-bit?
我的问题是如何知道我正在使用的第三方库或什至我自己的代码是否不支持 64 位? And how can I fix it?
我该如何解决?
Update更新
I added x86_64
to my build.gradle
and I now see the x86_64
folder in the apk but I think some of the files are missing.我将
x86_64
添加到我的build.gradle
,现在我在 apk 中看到x86_64
文件夹,但我认为某些文件丢失了。
Here is, how my x86
folder looks like:这是我的
x86
文件夹的样子:
And here is how my x86_64
folder looks like:这是我的
x86_64
文件夹的样子:
React Native will support 64 bit for android starting version 0.59 React Native 将从 0.59 开始支持 64 位 android
https://github.com/facebook/react-native/issues/2814#issuecomment-457688789 https://github.com/facebook/react-native/issues/2814#issuecomment-457688789
https://github.com/facebook/react-native/commit/f3e5cce4745c0ad9a5c697be772757a03e15edc5 https://github.com/facebook/react-native/commit/f3e5cce4745c0ad9a5c697be772757a03e15edc5
All of the native code for an app is stored in the libs/
directory in the root of the apk.应用程序的所有本机代码都存储在 apk 根目录的
libs/
目录中。 eg for compiled ARM or x86 code, you can find it in libs/architecture_type/lib_name.so.例如,对于已编译的 ARM 或 x86 代码,您可以在 libs/architecture_type/lib_name.so 中找到它。
An APK is essentially just a zip file so you can extract it with any zip tool. APK 本质上只是一个 zip 文件,因此您可以使用任何 zip 工具将其解压缩。
The list of architectures (ABIs) is here .架构列表 (ABI) 在这里。 If you don't have directories for arm64-v8a or have x86 but don't have x86_64 then you are missing the 64 bit native code.
如果您没有 arm64-v8a 的目录,或者有 x86 但没有 x86_64,那么您就缺少 64 位本机代码。
https://github.com/facebook/react-native/issues/2814 https://github.com/facebook/react-native/issues/2814
Facebook seems to be dragging their feet on supporting 64 bit builds. Facebook 似乎在支持 64 位构建方面拖拖拉拉。
You can check the intermediates in the build folder to see what abis you are supporting.您可以检查 build 文件夹中的中间件,以查看您支持的 abis。
https://developer.android.com/ndk/guides/abis.html https://developer.android.com/ndk/guides/abis.html
Android takes the lowest common denominator of build abi. Android 采用 build abi 的最小公分母。 This is going to become an issue if Facebook doesn't address it soon.
如果 Facebook 不尽快解决这个问题,这将成为一个问题。
React native has been released the new version of the react native on 12 march. React native 已于 3 月 12 日发布了 React Native 的新版本。 In this new version react native support the 64 bit systems.
在这个新版本中,react native 支持 64 位系统。 You can read more detail about this on below link.
您可以在以下链接中阅读有关此内容的更多详细信息。 http://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059
http://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059
react-native new versions support 64 bit automatically. react-native 新版本自动支持 64 位。 just update react-native version to 0.59.0 or after and rebuild your application, just run:
只需将 react-native 版本更新到 0.59.0 或之后并重建您的应用程序,只需运行:
react-native upgrade 0.59.1
If you are using react native version less than 0.59 then you must upgrade your apps to react native 0.59 or higher.如果您使用的 React Native 版本低于 0.59,那么您必须升级您的应用程序以使用 React Native 0.59 或更高版本。 React native supports 64 bit only from 0.59 version.
React Native 仅从 0.59 版本开始支持 64 位。
Also, make sure your app has following lines in your MyProject/Android/App/Build.gradle file.另外,请确保您的应用在 MyProject/Android/App/Build.gradle 文件中包含以下几行。
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk true // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
For more refer: Update your React Native Apps to be 64 Bit有关更多信息,请参阅: 将您的 React Native Apps 更新为 64 位
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.