Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio API Level warning not showing

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.

enter image description here

like image 722
NaviRamyle Avatar asked Jul 04 '14 03:07

NaviRamyle


People also ask

Where does Android studio specify the minimum API level for a project?

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”.

Why do we need API level in Android?

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.

Which value is used to indicate the API level your app is designed to run on?

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.

Which of the following is the API level of Android version 5?

Initial release for Android 5.0 (API level 21).


1 Answers

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

enter image description here

like image 175
NaviRamyle Avatar answered Oct 10 '22 01:10

NaviRamyle