3

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???

Code Eagle
  • 1,293
  • 1
  • 17
  • 34

2 Answers2

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

Latest documentation

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