Android Studio 3.1.3 having issues with Constraint layout

前端 未结 8 1137
囚心锁ツ
囚心锁ツ 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!

    0 讨论(0)
  • 2021-01-12 06:57
    1. On the left-hand side, click app.
    2. Then, open the res folder.
    3. Open up the values folder.
    4. Click on the 'styles.xml' folder.
    5. Change the parent variable to "Base.Theme.AppCompact.Light.DarkActionBar"
    0 讨论(0)
提交回复
热议问题