I am new to android development, and I have been using the command line tools to create an android project. I followed all the instructions given in the tutorial at android
I just got this error today and this is how I fixed.
Note: in my case, the error occured after I migrated one of my old projects to androidx and so imports hard to be androidx related. I am using android studio.
Note: You may run into other issues, so everytime I run into an error, I check other called classes and makes sure their imports are correct. What I do mostly is press ctrl+shift+R, and put the old import in the first field and the correct import on the second field and then replace all. This way, I replace all imports that in the project at once.
You can use ctrl+shift+f to find where imports are used.