androidx annotation Easy to import! : Android Problems

Posted under problems & solutions On By mohammed.mutawe

Androidx annotation

After migrate your project to android x , many problems occur when invoking libraries as Android Studio does not help you to automatically replace import files .



We prefer to do all updates on your project after migrating to android x which include:

  • Upgrade compileSdkVersion to last version  which is found in Gradle script.
android {
    compileSdkVersion 30
    buildToolsVersion '29.0.3'
  • Upgrade Gradle version which is found here.
 dependencies {
        classpath ''
  • Sync project.



Replace Annotation importing

In every activity has importing of annotations you must replace:



import androidx.annotation.NonNull;