Solved: Error: Version 28 (intended for Android Pie and below) is the last version of the legacy support library

If you want your application to be compatible with latest Android Version Q with API level 29, We will have to change app/build.gradle with compileSdkVersion & targetSdkVersion changed to to 29.

But since android uses androidx after API 29, if our application was using libraries from API 28, we may see the problem like below during compilation,

Error: Version 28 (intended for Android Pie and below) is the
 last version of the legacy support library, so we recommend that you 
migrate to AndroidX libraries when using Android Q and moving forward.
 The IDE can help with this: Refactor > Migrate to AndroidX... [GradleCompatible]

The Solution to this problem is as mentioned in error message, we have to upgrade our application to AndroidX libraries, this can be done as,

Related :   Use repo on Windows to download android source

Open your application in Android Studio and from “Refactor” option in Studio, click on “Migrate to Android X” once you click there in bottom left you will see “Do Refactor” button enabled, click on the same and Android Studio will automatically modify necessary files to migrate to start using AndroidX libraries.

For more information, refer to “Migrating your apps to Android 10


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded