App compat version for min sdk 9

2019-07-18 19:39发布

问题:

I have Android Studio version 2.3.3 and sdk tools version 25.2.5. When I build a new project with min sdk 9 it makes a mistakes and i have to use min sdk 14 for my project. it has anyway to change it to 9 and also use appcompat? my default appcompat version is v7:26.+ I also read other questions but my problem didn't solve.

回答1:

Starting with version 26.0.0 of the Support Libraries the minSdk has been bumped to 14 (Android 4.0, see this link). If you have to support platforms down to API-Level 9 you have to use version 25.4.0 which is last one that supported every api level from 7 onwards.

Note: There's really no reason to support such old devices, according to the latest numbers they only account for roughly 0.7% of all devices. (link)



回答2:

have to check the AppcombatActivity availabilty in Api. See this link https://developer.android.com/reference/android/support/v7/app/AppCompatActivity.html