X86 support build

You guys think it’s worth building for x86? Asking because if not this will reduce my apk size.

Thanks!

You should switch to AAB (Android App Bundle) for your Android release. This way the downloaded APK will increase more, because you don’t deliver ARM and ARM64 to the customers :wink:

PS: x86 is needed for the emulator to test.

I support armeabi-v7a and x86.

armeabi-v7a share is most biggest

image

x86 much less but you will support Chromebooks:

1 Like

First of all thanks for the response! As for the AAB looks like a lot of work to save a few MB. I completely forgot about Chromebooks, it’s a good reason to keep it :slight_smile:

By mid of 2019 every app update with native code need to include 64bit libraries: Important TargetSDK and NDK changes in Android app publishing - So you have also to include arm64 libs :wink:

What? It’s a no brainer. Instead of calling ./gradlew assemble I use ./gradlew bundle. I didn’t see lot of work for that. And every MB the user can save while downloading, will increase the install rate.

But before we need to update to gradle 4.10?

That’s a problem why? Updating the build tools is often a good idea :wink:

I remember build fails after I tried to upgrade gradle.
Will try again.

1 Like

@mars3142 you have some good points!

@mars3142 after update to gradle 3.10:

image

cocos2d-x 3.17.1-js

Hey, can you pls show me how to do it same with Android-Studio? Not from cmd prompt.

I’m using the latest (stable) Android Studio 3.3 (on macOS). You can find it in the menu:

Do you need more information?

PS: I can’t remember completely, but your build.gradle in the proj.android folder need to have at least classpath “com.android.tools.build:gradle:3.2.0”. Just test it.

Hmm. I never used any JS with cocos2d-x and therefore no AAB for it. Can you create a failing sample project on github/gitlab/bitbucket or any other hoster (where I can get pull git repo), so I can test and maybe fix it?

The same problem and solution at the end
https://discuss.cocos2d-x.org/t/cocos2d-js-3-17-android-black-screen/45242/7

Will try this evening

Ah, I see. The build folder structure has changed. I never saw this build.gradle entries, that’s why I didn’t know about it.

Updated gradle to 4.10.1
Solution to fix build here

And I was able to build Bundle.
Thank you @mars3142

1 Like