Reputation: 305
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.
Upvotes: 8
Views: 2510
Reputation: 539
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.
Quote from page:
Note: The material theme is only available in the Android L Developer Preview. For more information, see Compatibility.
Upvotes: 1