0
votes

Though-out ionic 2's development iv been building my app and testing it in the BETA channel of Google Play and everything's been going fine, today I updating to ionic 2 final and passed it to ionic package to build an APK for me...

ionic package build android --profile android --release

I have since uploaded it to Google Play and I'm getting...

A device with API levels in range 17+ is eligible to receive version 76, which is optimised for higher API levels, but actually receives version 3000328 because it has a higher version code. This would occur when Release track containing any of [BETA] and Screen layouts containing any of [small, normal, large, xlarge] and Native platforms containing any of [arm64-v8a, armeabi, armeabi-v7a, x86, x86_64] and Features containing all of [android.hardware.FAKETOUCH, android.hardware.LOCATION, android.hardware.location.GPS, android.hardware.location.NETWORK, android.hardware.screen.PORTRAIT].

A device upgrading from API levels = 16 to API levels in range 17+ would become eligible to receive version 76, which is optimised for higher API levels, but would actually receive version 3000328 because it has a higher version code. This would occur when Release track containing any of [BETA] and Screen layouts containing any of [small, normal, large, xlarge] and Native platforms containing any of [arm64-v8a, armeabi, armeabi-v7a, x86, x86_64] and Features containing all of [android.hardware.FAKETOUCH, android.hardware.LOCATION, android.hardware.location.GPS, android.hardware.location.NETWORK, android.hardware.screen.PORTRAIT].

A device with API levels in range 17+ is eligible to receive version 76, which is optimised for higher API levels, but actually receives version 3000258 because it has a higher version code. This would occur when Release track containing any of [BETA] and Screen layouts containing any of [small, normal, large, xlarge] and Features containing all of [android.hardware.FAKETOUCH, android.hardware.LOCATION, android.hardware.location.GPS, android.hardware.location.NETWORK, android.hardware.screen.PORTRAIT].

A device upgrading from API levels = 16 to API levels in range 17+ would become eligible to receive version 76, which is optimised for higher API levels, but would actually receive version 3000258 because it has a higher version code. This would occur when Release track containing any of [BETA] and Screen layouts containing any of [small, normal, large, xlarge] and Features containing all of [android.hardware.FAKETOUCH, android.hardware.LOCATION, android.hardware.location.GPS, android.hardware.location.NETWORK, android.hardware.screen.PORTRAIT].

Some devices are eligible to run multiple APKs. In such a scenario, the device will receive the APK with the higher version code.

76 is my current production version from 20 Aug 2015 (API Level 16+)

3000258 is an old BETA from Dec (API Level 16+)

3000328 is my latest BETA build from Today (API Level 16+)

I just want to use 3000328, but Google Play won't let me deactivate 3000258, when I do it says...

It is forbidden to downgrade devices which previously used M permissions (target SDK 23 and above) to APKs which use old style permissions (target SDK 22 and below). This occurs in the change from version 3000258 (target SDK 23) to version 76 (target SDK 0).

Any ideas why I can't deactivate 3000258? Thanks

2

2 Answers

1
votes

I see that you have listed the API levels that were used (API Level 16+), I am assuming that this is the minSdkVersion but the important attribute to check, and set in this case is the targetSdkVersion.

It's an issue caused by Google/Androids new permission system as of Android 6. Essentially if the app has been released with a targetSdkVersion of 23 there is a newer method of permissions management, that is not backward compatible. Google therefor will not allow you to downgrade the users who currently use the older permissions system, part of sdkVersion 23+, to a lower version.


It seems that the ionic build --release selects the highest available sdk version by default, which may be the reason that you have submitted a version in the past at a higher SDK version without explicitly stating it in your config.xml. For some reason now, your builds are using a lesser sdk version, and resulting in the errors you are seeing.

The quick solution, is to enforce the targetSdkVersion for SDK v23 to ensure that it will pass the activation process. It will, however, mean that only Android 6+ devices can download and use the app.

You can enforce this sdk version config.xml in the root of your Ionic project by adding <preference name="android-targetSdkVersion" value="23" />

After re-running the build process, double check the android manifest to ensure that it propagates correctly in this format:

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

Failing all of that, a StackOverflow user has reported a potential workaround that involves disabling beta testing altogether.

1
votes

Problem is not about 3000258. There is a problem about 76, probably about Target SDK version of that so you have to focus on 76, solve SDK Target problem and then you can disable 3000258 i quess.

I wrote this just in case if you trying to change 3000258 SDK Version. If you already tried to change SDK Target of 76, Don't mind this answer.