简体   繁体   中英

Developing for older Android version

I want to develop for Android 23 (Marshmallow). I created a new project, modify/remove everything and only use these as my project's components.

  • Android SDK Build Tools 23.0.3
  • Android SDK Platform 23
  • Android Gradle Plugin 2.1.3
  • Gradle 2.14.1
  • Target SDK version: 23
  • Minimum SDK version: 23
  • Compile SDK version: 23
  • JDK 1.8.0_211

I manage to get it running on my Android 28 (Oreo) device, but I read it somewhere that the later version of SDK, Build Tools and Gradle provides better security. Should I use all of the latest tools? if so, can I use the latest tools to develop only for Android 23?

Because when I installed Android Studio, it prompt me to target my SDK to 26 since Google Play requires developers to do so. Please teach me the best practice to develop for older Android version. Thank you in advance.

I think you are not aware of what targetSDKversion means. Let me clarify you. When Google releases a new version of android it brings new features, security and performances improvements. When you configure targetSDKversion then the user can benefit from these improvements while your app still runs on the older version.

For more information: https://developer.android.com/distribute/best-practices/develop/target-sdk

You do not develop for a single SDK version.

You develop for a RANGE of versions, going from MinimumSDK (yours would be 23) to TargetSDK (minimum of 26 to get into the Play Store, but always best to go the latest possible)

https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/android-api-levels?tabs=windows

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