Question:
I'm submitting an updated version of my app (sdk 23) on the Play Store and it's giving this error when I try to publish it in the Beta Tester section:
Unable to publish configuration for the following reasons: Devices that previously used M permissions (SDK 23 and higher) cannot be downgraded to APKs that use old-style permissions (SDK 22 and lower). This occurs when moving from version 32 (SDK 23) to version 29 (SDK 19).
I've already made the requestPermission changes for sdk 23. But to cover devices with android <23 my manifest looks like this:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
My build.gradle looks like this:
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "br.com.app.vertz"
minSdkVersion 14
targetSdkVersion 23
versionCode 36
versionName "2.8"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Still I get the error message:
Devices that previously used M permissions (SDK 23 and above) cannot be downgraded to APKs that use old-style permissions (SDK 22 and below). This occurs when moving from version 32 (SDK 23) to version 29 (SDK 19).
Answer:
It looks like you tried to upload an APK to production that uses the M (level 23) permissions model. This means that you cannot downgrade to previous versions. This is due to the permissions model changed between these different versions.
See here on Google Developer Console :
Note that rollbacks are not supported due to Android platform application version requirements. If you need to roll back, please check before releasing a previous APK with a new version number. However, this practice should only be used as a last resort as users will lose access to new features and the old application may not be compatible with the server's changes or data formats, so be sure to run tests alpha and beta before the update.
To fix it is necessary:
- Rebuild the project in its previous state with the highest version number (must be higher than all previously uploaded versions)
- resend