I have a problem with the API Level 21. I want to use the Material Design and still be able to run the application on lower API levels like 18 (Android 4.3.1). But I always get that error:
My manifest SDK looks like that:
And the build.gradle like that:
Hope this is enougth information to get some help, I really need it :(
Cheers.
Android 10 (API level 29) For details about the platform changes, see Android 10 for Developers.
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.
The Android Mobile Messaging SDK version 4.4. 2 uses: Minimum API version 19. Compile API version 28.
In addition, Android 12 provides backward compatibility behavior for sticky immersive mode.
Android 4.1 (API level 16) Android 4.0.3 (API level 15) Android 4.0 (API level 14) Android 3.2 (API level 13) Android 3.1 (API level 12) Android 3.0 (API level 11) Android 2.3.3 (API level 10) Android 2.3 (API level 9) This page provides release information about the SDK packages available for download from the SDK Manager, ...
Initial release for Android 7.1 (API level 25). Released as Android 7.1 Developer Preview 1. For more information, see the Android 7.1 API Overview. Android SDK Platform-Tools 25.0.0 or higher is required.
Android 7.0 (API level 24) For details about the platform changes, see Android 7.0 for developers. Revision 1 (August 2016) Android 6.0 (API level 23)
Android versions and API levels. As the Android platform evolves and new Android versions are released, each Android version is assigned a unique integer identifier, called the API Level. Therefore, each Android version corresponds to a single Android API Level.
As described in doc : https://developer.android.com/training/material/theme.html
Note: The material theme is only available in Android 5.0 (API level 21) and above
This means that you have to use the values-v21 folder for your Material Theme.
However you can use the v7 Support Libraries to provide themes with material design styles for some widgets. This is an example, using the AppCompat Theme.
<style name="Theme.MyTheme" parent="Theme.AppCompat.Light">
<!-- Here we setting appcompat’s actionBarStyle -->
<item name="actionBarStyle">@style/MyActionBarStyle</item>
<!-- ...and here we setting appcompat’s color theming attrs -->
<item name="colorPrimary">@color/my_awesome_red</item>
<item name="colorPrimaryDark">@color/my_awesome_darker_red</item>
<!-- The rest of your attributes -->
</style>
More info here: https://chris.banes.me/2014/10/17/appcompat-v21/
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