I pushed an update to the Play Store today adding a material design layout for Android L and some other various bug fixes, however, users who are not using Android L are unable to update. When attempting to update the application, they are presented with "Application requires newer SDK version".
I compiled the application with "android-L", my minimum SDK requirement is 14 and my target SDK is "L". I created a new values folder (values-v21), which uses the same theme name as my other values folders for previous versions of Android. However, instead of using Theme.Holo.Light the v21 folder uses:
<style name="AppBaseTheme" parent="@android:style/Theme.Material.Light">
Is there any way that I can implement the material layout for Android L users while keeping compatibility with Android 4.0 - 4.4?
Edit: I was using Android API 20, L Preview support library. Reverting back to 19 breaks compatibility with the material layouts.
In order to provide backward compatibility, developers can check at runtime the platform version and use a new API on newer versions of the platform and old API on older versions or, depending on the case, using some static libraries which offer backward compatibility.
Google Play Store compares the features your app requires to the features available on each user's device to determine whether your app is compatible with each device. If the device does not provide all the features your app requires, the user cannot install your app.
To get to the developer options, open your device's Settings app and navigate to System > Advanced > Developer options > App Compatibility Changes. In this case, the BACKGROUND_RATIONALE_CHANGE_ID is the only change that is enabled to minimize scope of possible causes for any issues that your app might encounter.
No matter what you do in Gradle/Android studios if you set your target to L-Preview
it will override your minSDK
. As of right now you should not target L-Preview
for anything in production. This is why your users are seeing that issue when trying to update, this also means you can't use the Material Themes in production.
You should revert and wait for the full release of L to use the material layouts.
Material Theme
Quote from page:
Note: The material theme is only available in the Android L Developer Preview. For more information, see Compatibility.
L Compatibility
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With