Render error in Android Studio 3.0 Layout Editor

后端 未结 11 2044
离开以前
离开以前 2020-11-28 07:20

I just started learning Kotlin for android development and started an empty project and added an activity. I have added the required gradle dependencies as said in Kotlin do

相关标签:
11条回答
  • 2020-11-28 07:47

    Well, check your gradle , have you added support:appcompat dependency in app/build.gradle file ? also appcompat:design dependency

    0 讨论(0)
  • 2020-11-28 07:47

    There is problem with version 25.4.0 of support libraries by me. I returned to version 25.3.1 and the layout render works.

    0 讨论(0)
  • 2020-11-28 07:47

    I solved this issue by change the support design version to the same appcompat version. This is my sample dependencies

    dependencies {
        compile 'com.android.support:appcompat-v7:25.3.1'  
        compile 'com.android.support:design:25.3.1'
    }
    

    Previously i used

    compile 'com.android.support:design:25.4.0
    

    '

    0 讨论(0)
  • 2020-11-28 07:51

    If none of the above works the try this:

    • Go to Tools > Android > SDK Manager
    • Inside Appearance & Behavior > System Settings > Android SDK select the SDK Tools tab.
    • update the Android SDK Build-Tools to 26.0.1 or the latest available.

    This answer will most probably solve the issue.

    0 讨论(0)
  • 2020-11-28 07:55

    This solution may help you. Modify style.xml from:

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    </style>
    

    to:

    <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
    </style>
    
    0 讨论(0)
提交回复
热议问题