简体   繁体   中英

How to set minimum android version support in ionic +react + capacitor project?

我不知道如何设置要支持的最低 android 版本,创建的 apk 仅适用于新版本的 android,不适用于旧版本,我是一名网络开发人员,以前从未开发过与 android 相关的任何内容,应该我在 android studio 上安装了与该版本相关的 sdk 平台,或者在我的开发文件中有特定的配置要更改???

If you are using the latest Capacitor version (v3) you can set the minimum and target SDK version in android/variables.gradle .

ext {
    minSdkVersion = 21
    compileSdkVersion = 30
    targetSdkVersion = 30
    ...
}

Latest documentation

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM