even i resynced the gradle,i still cant see the design view.it happens with all projects,Even i started a totaly new project and it has the same problem
picture of Errors :
Errors: 1)Render problem: failed to find style 'coordinateLayoutStyle' in current theme.
2)Using private resources: The resources @string/appbar_scrolling_view_behaviour is marked as private in com.android.support.design .
3) Missing styles: Missing styles, is the correct theme chosen for this layout?
4) Failed to instantiate one or more classes: The following classes could not be instantiated: -android.support.design.widget.CoordinatorLayout -android.support.design.widget.AppbarLayout
I figured it out,Actually there is a problem with SDK 28.
Solution: Use SDK version 27 ie in your " build.gradle(Module:app) " and change
compileSdkVersion 28
targetSdkVersion 28
TO:
compileSdkVersion 27
targetSdkVersion 27
Also use these Dependencies versions:
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
This will solve the issue,but it will still show an
Rendering Problem:Failed to find style 'coordinatorLayoutStyle' in current theme To solve this issue write this into application theme
<style name="Apptheme.NoActionBar">
<item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item>
</style>
Hope so that will help you!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.