本文介绍了我怎么能发布来玩我的cordova-crosswalk应用程序的x86和ARM apks?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



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






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

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.

It seems it's possible to upload on the play store multiple apk files for the same version of an application byt filtering the devices targetted by each apk file.

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

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 ?

解决方案

It's absolutily possible.This feature receve the name of: Multiple APK

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

The process is simple:

  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!

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

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">

In my case, the arm7 apk, the

And in x86 apk the

References:

Android Multiple APKs DOC

Maintaining Multiple APKs DOC

这篇关于我怎么能发布来玩我的cordova-crosswalk应用程序的x86和ARM apks?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 00:51