如何发布以播放存储我的cordova-crosswalk 应用程序的x86 和ARM apk? [英] How can I publish to play store the x86 and ARM apks of my cordova-crosswalk app?

查看:25
本文介绍了如何发布以播放存储我的cordova-crosswalk 应用程序的x86 和ARM apk?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用是使用 Cordova 和 Crosswalk 开发/发布的.Crosswalk 为 ARM cpus 生成一个 apk,为 x86 cpus 生成另一个.

My app is developped/published with Cordova and Crosswalk. Crosswalk generates an apk for ARM cpus and another one for x86 cpus.

目前,当我将我的 ARM apk 上传到 Play 商店,然后尝试上传 x86 版本时,它阻止我这样做并显示一条消息,说我不能有两个版本代码相同的 apk.

At the moment, when I upload my ARM apk to the play store and then try to upload the x86 one, it prevents me from doing so and display a message that says that I cannot have two apk with the same version code.

似乎可以在 Play 商店上传多个 apk 文件,用于同一版本的应用程序通过过滤每个 apk 文件所针对的设备.

但是,它似乎需要使用 Cordova 项目结构默认没有的Application.mk"文件.

However, it seems to require the use of an "Application.mk" file that the Cordova project structure doesn't seem to have by default.

如何在我的 apk 中包含 Application.mk 文件,以便具有相同版本代码的 ARM 和 x86 都可以上传到 Play 商店?

How can I include an Application.mk file within my apks so that both the ARM and the x86 with the same version code will be uploadable to the Play store ?

推荐答案

绝对有可能.此功能的名称为:Multiple APK

您不需要使用Application.mk"

You don't need to use the 'Application.mk'

过程很简单:

  1. 在开发者控制台中,切换到高级模式(点击 APK 标签右上角的切换到高级模式按钮 - 请注意,您必须至少已上传出现该按钮的一个 APK)
  2. 上传两个 APK
  3. 发布!
  1. In Developer Console, switch to Advanced Mode (click the Switch to advanced mode button at the top right of the APK tab - note that you must have uploaded at least one APK for that button to appear)
  2. Upload the two APK
  3. Publish!

使用多个 APK 有一些规则,但是如果使用cordova crosswalk 生成的文件,则无需担心.

There's some rules to use multiple APK, but if you use the files generated by cordova crosswalk, you have nothing to worry about.

您使用版本代码描述的问题是因为每个应用必须具有不同的版本代码.就我而言,我使用离子框架(扩展cordova)并且在构建过程中,它为每个apk生成了不同的版本代码,所以我没有问题.如果您没有遇到这种情况,您可以尝试直接在 AndroidManifest.xml 文件中更改 de android:versionCode.这是我的清单的样子:

The problem that you described with version code, happens beacuse each app must have a different version code. In my case, I use ionic framework (extends cordova) and in the build process, it generated a diferent version code por each apk, so I had no problem. If it not happens for you, you can try to change de android:versionCode directly on the AndroidManifest.xml file. Here is how my manifest looks like:

<manifest 
  android:hardwareAccelerated="true" 
  android:versionCode="102" 
  android:versionName="0.1.2" 
  package="br.org.yyyyyyy.xxxxxxxxxx"   
  xmlns:android="http://schemas.android.com/apk/res/android">

就我而言,arm7 apk,

In my case, the arm7 apk, the

android:versionCode="102"

android:versionCode="102"

在 x86 apk 中

And in x86 apk the

android:versionCode="104"

android:versionCode="104"

参考文献:

Android 多个 APK 文档

维护多个 APK DOC

这篇关于如何发布以播放存储我的cordova-crosswalk 应用程序的x86 和ARM apk?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆