Home Forum

Apps minSdkVersion vs compileSdkVersion ???

I am going thru a lot of very old codes for which I had to (this afternoon) download SDK 7 & 10 , but left the compileSdkVersion at 22 and buildToolsVersion at '25.0.2' in the belief that A/Studio will automagically upgrade everything.

<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="10" />

android {
compileSdkVersion 22
buildToolsVersion '25.0.2'

Almost got the codes working with this exception (see .jpg)
UninstallOldAPK.JPG
So I uninstalled the APK as told. but no, that didn't work.
It's tricky because it has another project inside a project.

QUESTION: does this mean I have to use compileSdkVersion 10 throughout and there's no easy way to magically upgrade everything?

Incidentally, if you try to run the old codes in the new environment, A/Studio throws literally hundreds of errors complaining it cannot read the <java>.class

Altogether a most interesting exercise.
 

Related:

#1 ac4android, Feb 20, 2017
Welcome to the world of software maintenance. If you're using a library based on an earlier version of the SDK, it will drag you back there, and you'll either have to carry the baggage, or ask the creators of the library to produce an up to date version.
There's no magic bullet to automatically upgrade everything.
 
#2 LV426, Feb 20, 2017