how to fix importing NotNull or Nullable problem in android studio

Android to androidx problems solution

After working and searching for hours and you can’t get the solution you are looking for. You are welcome to the home of Android Developer. If you have being using Android Studio for writing Java apps, Java codes is everything sensitive raging from capital letters, punctuation errors, misspelled of words and plugin updates.

Android Studio comes up with new updates always which depreciated the older once. A code you write today, use it and develop an app may be outdated and depreciated tomorrow. If you copy somebody’s code or forked a code from github, there are chances that the code which worked earlier won’t work again unless you do serious editing.

For instance android:support is no longer in use.
Support v7 and support v4 are all outdated.
You may not notice all these unless you want to integrate admob in your Android Studio app.

at android.os.Handler.handleCallback(
        at android.os.Handler.dispatchMessage(
        at android.os.Looper.loop(
        at java.lang.reflect.Method.invoke(Native Method)

here we are going to show you how to fix 



after Migrating from Android to Androidx

apply plugin: ‘’

1. check your build.gradle

android {

compileSdkVersion 28

defaultConfig {

applicationId “com.techmax.fashionlast”

minSdkVersion 21

targetSdkVersion 28

versionCode 1

versionName “1.0”

testInstrumentationRunner “androidx.test.runner.AndroidJUnitRunner”


buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘’




dependencies {

implementation fileTree(dir: ‘libs’, include: [‘*.jar’])

implementation ‘androidx.appcompat:appcompat:1.1.0’

implementation ‘androidx.constraintlayout:constraintlayout:1.1.3’

testImplementation ‘junit:junit:4.12’

androidTestImplementation ‘androidx.test:runner:1.2.0’

androidTestImplementation ‘androidx.test.espresso:espresso-core:3.2.0’


2. Fix your XML files for androidx