Android Studio 3.0 Layout Preview render issues

前端 未结 6 1602
挽巷
挽巷 2020-12-15 14:15

I just updated my Android Studio to latest 3.0 and then the Layout Preview is not working anymore. I have tried open up different projects and they all have the same render

6条回答
  •  伪装坚强ぢ
    2020-12-15 15:02

    OK, I tried to explore every possible solution but no work. I finally figured it out by changing the deployment SDK/Version. I changed all to 26 and it fixed my problems. As I tested version lower and higher, it seems only ver 26 can work.

    android {
     compileSdkVersion 26
     buildToolsVersion '26.0.2'
    ...
     defaultConfig {
      targetSdkVersion 26
    ...
     }
    }
    ...
    dependencies {
      compile 'com.android.support:appcompat-v7:26.0.0'
      compile 'com.android.support:design:26.0.0'
      compile 'com.android.support:support-v13:26.0.0'
      compile 'com.android.support:support-v4:26.0.0'
      compile 'com.android.support:palette-v7:26.0.0'
    ...
    }
    

    So if the solution at Render error in Android Studio 3.0 Layout Editor does not work for you. You can try 26. Let me know.

提交回复
热议问题