I\'m having problems with Android Studio. I recently upgraded my SDK Manager to include;
compile \'com.android.support.constraint:constraint-layout:1.0.0-bet
I had the same issues. For me, the reason is my project "Automatically convert third-party libraries to use AndroidXhas". What to do? simply following two steps:
1st step: Please check your gradle.properties, if you see the following lines, you might have the exact same issues as mine. You can firstly delete them.
android.useAndroidX=true
android.enableJetifier=true
2nd step: in main activity, I changed
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
into
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
Everything works all of sudden!