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?
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.
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.
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" }
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