问题
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:
- 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)
- 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
- Multi APK release
What is the best approach? Is there an easier way?
来源:https://stackoverflow.com/questions/50326293/how-to-support-api-levels-14