简体   繁体   English

谷歌 Play 商店的 react-native android 应用程序中的 64 位版本问题

[英]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文件夹的样子:

在此处输入图片说明

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.

相关问题 如何上传 react-native 0.54.3 android Apk 到 Play 商店? 它正在抛出 google play 64 位要求错误 - How to upload react-native 0.54.3 android Apk to play store? it is throwing google play 64-bit requirements error React-Native:如何从反应原生应用程序打开谷歌游戏商店? - React-Native: How to open google play store from react native app? React Native 0.61 版本中的 Google Play 64 位要求 - Google Play 64-bit requirement in React Native Version 0.61 release 如果应用程序从未通过 Play 商店发布,是否需要 android 64 位应用程序版本 - is android 64 bit app version necessary if the app is never published through play store 在64位Android设备上从Google Play商店安装应用时,如果该应用支持,该应用是否以64位安装? - When installing an app from the Google Play store on a 64-bit Android device, does the app install as 64-bit if the app supports it? Android React Native App HostNameVerifier 来自 Google Play 商店的错误 - Android React Native App HostNameVerifier Error from Google Play Store 使用React-Native AsyncStorage在App Store / Google Play中通过应用程序更新存储数据 - Storing data through app updates in App Store/Google Play with React-Native AsyncStorage Android Google Play致命异常:发布时带有React-Native应用的mqt_native_modules - Android Google Play FATAL EXCEPTION: mqt_native_modules with React-Native app on Release APK Expo React-Native Android 版本未更新 Google Play 的版本代码 - Expo React-Native Android build not updating Version Code for Google Play 是否必须为在Google Play商店上发布的所有Android应用程序同时支持ARM和Intel(32/64)位架构? - Is it compulsory to support both ARM and Intel ( 32/64 ) bit architecture for all the Android App published on Google Play Store?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM