• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps minSdkVersion vs compileSdkVersion ???

ac4android

Well-Known Member
Nov 3, 2015
198
29
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.
 
QUESTION: does this mean I have to use compileSdkVersion 10 throughout and there's no easy way to magically upgrade everything?

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.
 
  • Like
Reactions: sweetndreemy73
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones