2
votes

I am moving on Android O and below is my configuration:

compileSdkVersion 26
buildToolsVersion 26.0.0
targetSdkVersion 26
com.android.support:appcompat-v7: 27.1.1
com.android.support:support-v4: 27.1.1
com.android.support:recyclerview-v7: 27.1.1
com.android.support:design: 27.1.1
com.android.support:support-annotations: 27.1.1

Q1 As per Android guideline:

In the second half of 2018, Play will require that new apps and app updates target a recent Android API level.

The recent Android API version is 27 (8.1) but In my case, compileSdkVersion 26, buildToolsVersion 26.0.0, targetSdkVersion 26. So as per guideline, should I keep 26 or 27?

Q2 What if I keep using compileSdkVersion 26, buildToolsVersion 26.0.0, targetSdkVersion 26 ? Is this violation of guideline or it's fine?

Q3 Is it fine if I keep support library version as 27.1.1 and compileSdkVersion 26, buildToolsVersion 26.0.0, targetSdkVersion 26? Is there something wrong with this combination?

1

1 Answers

1
votes

below is my configuration:

You should be getting complaints in Android Studio about having a targetSdkVersion and compileSdkVersion that are lower than the major version of the support libraries that you are trying to use.

So as per guideline, should I keep 26 or 27?

We have no way of knowing for certain what Google will require. I recommend moving your compileSdkVersion and targetSdkVersion to 27.

Is it fine if I keep support library version as 27.1.1 and compileSdkVersion 26, buildToolsVersion 26.0.0, targetSdkVersion 26? Is there something wrong with this combination?

There is rarely a reason to keep your buildToolsVersion artificially low. And, as noted above, you should get complaints (and possibly build errors) given your combination of values. I recommend moving your compileSdkVersion and targetSdkVersion to 27, and set your buildToolsVersion to the latest (27.0.3 IIRC).