Android Studio 3.1.3 having issues with Constraint layout

前端 未结 8 1142
囚心锁ツ
囚心锁ツ 2021-01-12 06:14

I\'m trying to start a new project here but this problem is appearing. I can run the project and deploy it in an emulator but this Render problem and Using private resources

8条回答
  •  借酒劲吻你
    2021-01-12 06:55

    I had the same issues. For me, the reason is my project "Automatically convert third-party libraries to use AndroidXhas". Check if your problem same as mine? please simply follow the two steps described here.

    to make it easy:

    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!

提交回复
热议问题