I don't know how to set the minimum version of android to support, the apk created works only in new versions of android and doesn't work on older ones, i am a web developer and never developed anything related to android before, should i install sdk platforms related to that version on android studio or there is a certain config to change in my development files???
Asked
Active
Viewed 4,954 times
2 Answers
11
If you are using the latest Capacitor version (v4) you can set the minimum and target SDK version in android/variables.gradle
.
ext {
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
...
}

leonardofmed
- 842
- 3
- 13
- 47
-2
you should set Target SDK version and Min SDK version, you can set it in your config.xml like this :
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="29" />
and you need to install SDK for sure , for example in the code that i've written you should have SDK 29 ( or any other SDK) .

Ali Mhanna
- 401
- 3
- 14
-
3`config.xml` is for cordova projects. – leonardofmed Jun 22 '21 at 13:38