Home » Android » How to change API Level in Android Studio-Exceptionshub

How to change API Level in Android Studio-Exceptionshub

Posted by: admin February 24, 2020 Leave a comment

Questions:

When I open a new project the default API is 28

android {
compileSdkVersion 28
defaultConfig {
   ....................  
    minSdkVersion 22
    targetSdkVersion 28
    ....................
}

I change it to 27

android {
compileSdkVersion 27
defaultConfig {
   ....................  
    minSdkVersion 22
    targetSdkVersion 27
    ....................
}

Then I go to Open Module Settings and choose

Compile Sdk Version 27

Target Sdk Version 27

Then I do Clean Project and Rebuild Project . And I get an error, it refers to values-v28.xml any way.

How to&Answers:

I’ll pose another question. If I compile my project with API 28 and the API installed on my phone is 27 – can it cause the project crash?