I'm having trouble, there is no warning when I use methods above API Level 8
setCalendarViewShown(false);
Is just an example
Even if I build my app there's no error, I'll only encounter the error when the app reaches the unsupported method.
Step 1: Open your Android Studio, and go to Menu. File >Project Structure. Step 2: In project Structure window, select app module in the list given on left side. Step 3: Select the Flavors tab and under this you will have an option for setting “Min Sdk Version” and for setting “Target Sdk Version”.
Declaring a minimum API Level This ensures that users will only be able to install your application if their devices are running a compatible version of the Android platform. In turn, this ensures that your application can function properly on their devices.
android:minSdkVersion — Specifies the minimum API Level on which the application is able to run. The default value is "1". android:targetSdkVersion — Specifies the API Level on which the application is designed to run.
Initial release for Android 5.0 (API level 21).
I just solve my problem
I just check the File > Settings > Inspections > Android Lint > "Calling new methods on older versions" because it's unchecked before
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