How to support API levels < 14?

自闭症网瘾萝莉.ら 提交于 2020-01-04 10:59:05

问题


As it is known, the minimum API level for using the Android support library is 14 now. I would like to release a new version of my app (currently minSdk 15 and targetSdk 27) to support API < 14 (down to Froyo at the minimum if possible). Why you ask? I do not plan to keep supporting for these old system versions, but rather just to fix one critical bug to help the numerous users I have on these platforms - a bug which will actually help them export their data to newer versions.

When changing the minSdk to 10 I get the following error:

Manifest merger failed : uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library [com.android.support:appcompat-v7:27.1.1] as the library might be using APIs not available in 10 Suggestion: use a compatible library with a minSdk of at most 10, or increase this project's minSdk version to at least 14, or use tools:overrideLibrary="android.support.v7.appcompat" to force usage (may lead to runtime failures)

Anyway, here is what I considered - or a combination of the following:

  1. Using an old support library version 25.4.0 that work with minSdk < 14 as an "oldApi" product flavor (and the new support library version for the normal release flavor)
  2. Use the original methods from the old platform versions without support libraries at all and then release an APK with minSdk X and maxSdk 14
  3. Multi APK release

What is the best approach? Is there an easier way?

来源:https://stackoverflow.com/questions/50326293/how-to-support-api-levels-14

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!