简体   繁体   English

Ionic / Cordova和Android 64位要求

[英]Ionic/Cordova & Android 64-bit requirement

Google has announced that beginning August 1st, 2019, all new apps and app updates must provide a 64-bit version in addition to a 32-bit version. 谷歌已经宣布从2019年8月1日开始,除了32位版本之外,所有新的应用和应用更新都必须提供64位版本。 I have an Ionic 3 (Cordova) app, and I'm not sure what impact this has. 我有一个Ionic 3(Cordova)应用程序,我不确定它有什么影响。 What, specifically, does an Ionic/Cordova app need to do to meet this requirement? 具体而言,Ionic / Cordova应用程序需要做什么才能满足此要求?

Starting August 1, 2019: 从2019年8月1日开始:

All new apps and app updates that include native code are required to provide 64-bit versions in addition to 32-bit versions when publishing to Google Play. 除发布到Google Play的32位版本外,所有包含本机代码的新应用和应用更新都需要提供64位版本。

It doesn't really depend on Cordova/Ionic, but in the plugins you use. 它并不真正依赖于Cordova / Ionic,而是在你使用的插件中。

If any of the plugins you use, has .so libraries, then they should provide a 64 bit version of that library. 如果你使用的任何插件都有.so库,那么它们应该提供该库的64位版本。 If none of your plugins use .so libraries, then you are good to go. 如果你的插件都没有使用.so库,那么你很高兴。

If you are not sure if your plugins use .so libraries, Google recommends to check your apk (unzipping it or using APK analyzer). 如果您不确定您的插件是否使用.so库,Google建议您检查apk(解压缩或使用APK分析器)。 If you have a lib folder and it has armeabi-v7a and x86 folders, make sure there is also arm64-v8a and x86_64 folders with the same libraries in each of them. 如果您有一个lib文件夹并且它有armeabi-v7ax86文件夹,请确保还有arm64-v8ax86_64文件夹,每个文件夹中都有相同的库。

For more information: https://developer.android.com/distribute/best-practices/develop/64-bit 有关更多信息: https//developer.android.com/distribute/best-practices/develop/64-bit

  1. go to this link https://www.npmjs.com/package/cordova-plugin-build-architecture and install " npm i cordova-plugin-build-architecture " 转到此链接https://www.npmjs.com/package/cordova-plugin-build-architecture并安装“ npm i cordova-plugin-build-architecture
  2. Add the following lines in your " config.xml " 在“ config.xml ”中添加以下行

<preference name="xwalk64bit" value="true" />


<preference name="buildArchitecture" value="arm64" /> <!-- [If you want to fetch the 64 bit arm build] -->

Screen Shot Attached: 屏幕截图附: 在此输入图像描述

  1. Last Step is you can run gradlew assembleRelease command in your cd platforms/android folder and see the build outputs apk with these folders " x86_64 " & " arm64 " 最后一步是你可以在cd platforms / android文件夹中运行gradlew assembleRelease命令,看看这些文件夹“ x86_64 ”和“ arm64 ”的构建输出apk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM