简体   繁体   中英

Android compileTarget P appcompat library

https://i.imgur.com/gvEwBkL.png

Android Studio tells me to use a newer Version of appcompat. Is there one for Android P already? I have to target P because of AndroidX.

Is there one for Android P already?

Yes. We have 28.0.0-alpha1, released in march

Note: 28.0.0-alpha1 is a pre-release version to support the Android P developer preview. Its API surface is subject to change, and it does not necessarily include features or bug fixes from the latest stable versions of Support Library. For details on the P developer preview, see the release notes.

I'm not sure if you are aware of that, but AndroidX is substitution for appcompat library.

AndroidX is set of libraries that package everything that is not included in the system, but in your app. That includes support/appcompat libraries. It should be your go-to option when target Android P and future versions.

So if you want to target P because you want to use AndroidX, then you don't need appcompat at all , because you have everything you need in AndroidX. To check which packages from AndroidX should replace packages in appcompat, see: https://developer.android.com/topic/libraries/support-library/refactor

For more information and explanation what AndroidX really is, see this blog post on Android Developers Blog.

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