Issue
I got an email from google saying I had to update my targetsdk settings to be at least 26 by november 2018. So having waited almost 2 years I finally tried to switch to android studio from eclipse where I come to realized we've just traded one set of known problems to another set of unknown problems. I purposefully waited to migrate so everybody else could suffer the bleeding-edge-everything-is-broken problems and in fact every problem I run into has a stack overflow response except this one:
the compilesdk version has to be the same as the support library.
the compilesdk version should not be lower than the targetsdkversion.
the targetsdk version and the compiler version should be the latest which is 28 at the moment
But there's no appcompat past 26.0.0-beta1 as far as I can tell so it's impossible to satisfy all of the requirements as far as I can tell. What are you actually supposed to do?
Solution
Since Android Pie has been released a few days ago, I would wait for a stable Android Studio 3.2 release, because it has several refactoring options like migrating support lib to androidX etc. - so then you can go on with compileSdk and targetSdk 28 and also refactor the support libs to androidX (which will be necessary anyway). You can try that already with Android Studio 3.2 Beta but do not forget to raise the gradle version to at least 3.2-beta05 too, otherwise you might get unexpected errors, especially with migration of the old support libs.
Edit: If your current project is not even targeting API lvl 26, you'll probably have a lot of work to do anyway (depends on the features you use from the android sdk), imho it would be the best to go through the "behavior changes" articles first (brought for each new android version) to know how it may affect your app. So if you want to test it as quick as possible, simply use the current Android Studio version (3.1.4), raise target- and compileSDK to 28 and also the support libs. then, as soon as Android Studio 3.2 (and gradle plugin 3.2.0) is released, you can take advantage of the migrating feature for AndroidX. But for now, you should be more worried about the behaviour changes caused by the SDK update and not AndroidX. My first suggestion was just to wait for the android studio update to do that all in one step, instead of being annoyed at the next release when app compat will be deprecated.
Answered By - mathew11
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.