0

https://i.stack.imgur.com/BPyCo.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.

Sagar
  • 23,903
  • 4
  • 62
  • 62
Daniel Däschle
  • 766
  • 10
  • 32

2 Answers2

1

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.

Tim
  • 41,901
  • 18
  • 127
  • 145
0

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.

michalbrz
  • 3,354
  • 1
  • 30
  • 41
  • Yes i know that. But here is described something: https://developer.android.com/topic/libraries/architecture/adding-components ```Navigation classes are already in the androidx.navigation package, but currently depend on Support Library 27.1, and associated Arch component versions. Version of Navigation with AndroidX dependencies will be released in the future.``` – Daniel Däschle May 29 '18 at 18:13