...minSdkVersion in your manifest

Discussion and feedback on Construct 2

Post » Sat Aug 02, 2014 3:11 am

Wasn't sure where to put this and this might be a weak post since I'm just figuring this out now.

If you upload an APK to Google Play created with CocoonJS as of August 1, 2014 you'll probably get this error:

"You uploaded an APK that uses Google Play services version 4242000. This will only work with Android API levels of 9 and above. This cannot be published in Google Play unless you have set the minSdkVersion in your manifest to 9 or higher."

To fix this you're going to need to decode your APK file, edit the AndroidManifest.XML file, encode the APK file and then sign it.

To decode your apk you'll need apktool.

Grab these files:

https://android-apktool.googlecode.com/ ... ot.tar.bz2

https://android-apktool.googlecode.com/ ... .2.tar.bz2

You'll need to add the .exe and .jar file(s) to your Windows system path, or if you're like me just dump the contents of both archives to where your java.exe file is.

Decode APK:

java -jar apktool.jar decode <APP_NAME.apk> <PATH AND FOLDER NAME FOR DECODED APK> (example c:\android\decoded_apk\)

Edit the AndroidManifest.XML file and add this line in the 'uses' list:

<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="16"/>

Encode APK:

java -jar apktool.jar build <PATH AND FOLDER NAME TO DECODED APK> <PATH AND NEW APP NAME>.apk (example C:\android\my_game_new_encoded.apk)

Now just sign it as you normally would and you should be able to upload it to Google Play now.

Thanks to all the info on the internet I borrow this information from! :)

I hope this makes sense ;) Caution: I think this may increase the min OS version required from 2.2 to 2.3, so hopefully that doesn't hurt anyone's user base. Not 100% sure on that change though, just something I read!
B
12
S
1
Posts: 16
Reputation: 1,332

Post » Sat Aug 02, 2014 3:59 am

If you made the APK with CJS, you can set the minimum OS version on their cloud compiler, likewise, XDK has OS 4+ minimum.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Sat Aug 02, 2014 6:59 pm

@Crebbs I am also experiencing the same problem. What is this issue?
B
12
S
2
Posts: 76
Reputation: 930

Post » Sun Aug 03, 2014 7:30 pm

Google sent out a warning regarding this I believe that as of August 1 their services code would be updated and apps that supported outdated versions wouldn't be allowed to be uploaded to the store. Sorry, really just paraphrasing here as I don't remember the exact details ;)

But I guess you can set a higher version in CocoonJS or use my fix above since I tried it on an update for my game and it worked fine. I haven't tried just using a higher OS target in CJS yet.
B
12
S
1
Posts: 16
Reputation: 1,332


Return to Construct 2 General

Who is online

Users browsing this forum: David181 and 10 guests