Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the minSdkVersion of a project?

Tags:

android

I have been building a project and testing it on the Android emulator.

I realized that I set the minSdkVersion to 10. Now, I have a phone to test the program on, but its sdk version is 7.

I tried to go into the manifest file, and change the sdk version to 7, but every time I run the program, it crashes.

How can I rebuild or change the sdk version to a lower number (from 10 to 7), so that I can make sure my app is able to run on older phones?

like image 941
Peter Avatar asked Mar 25 '11 00:03

Peter


People also ask

Where can I change minSdkVersion?

To change Android minSdkVersion in Flutter for the project created after the 2.8 update, you have to make changes in the local. properties file and then reference the new variable from the local. properties file inside the build. gradle file.

How do you change minSdkVersion in react native?

You can see it here on their official build. gradle file: android { compileSdkVersion 28 ... defaultConfig { minSdkVersion(16) targetSdkVersion(28) versionCode(1) versionName("1.0") } ... } By setting minSdkVersion to 16 , react-native uses Android API's natively supported by at least KitKat version.


1 Answers

In your app/build.gradle file, you can set the minSdkVersion inside defaultConfig.

android {     compileSdkVersion 23     buildToolsVersion "23.0.3"      defaultConfig {         applicationId "com.name.app"         minSdkVersion 19    // This over here         targetSdkVersion 23         versionCode 1         versionName "1.0"     } 
like image 175
juil Avatar answered Sep 19 '22 22:09

juil