简体   繁体   中英

Can I upload apks for multiple architectures into the Google Play store without using the android NDK?

I need to produce 2 apks, one for x86 and one for ARM. I do this with different versions of crosswalk, which internally uses cordova. All I need to do one the two projects are created is ./cordova/build --release and then sign the APK. The Google Play store docs mention a way of uploading both into a single app listing, but they assume I'm using the Android NDK, which I'm not. Will I need to start using it or is there another way to simply upload both apks?

Google does support posting of architechture-specific APKs: http://developer.android.com/google/play/publishing/multiple-apks.html . Note however that the documentation states, in bold :

we encourage you to develop and publish a single APK

So, if you take the single APK approach:

Just compile your native code into libraries (ie .so files) and place them in the following locations

<Project_Root>/app/src/main/jniLibs/armeabi/

and

<Project_Root>/app/src/main/jniLibs/x86/

The build process will package these in the appropriate manner so that your APK contains libs for both architectures. Then at runtime, Android will ensure that the architecture-appropriate library is loaded.

Note that the above assumes that you are using Gradle to build your APKs. If you are using the old ant-based build process, the locations are slightly different:

<Project_Root>/libs/armeabi/

and

<Project_Root>/libs/x86/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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