I have downloaded a project off of GitHub and then imported it into Android Studio. It seems to work fine, but I keep getting rendering errors on the design view. The designs are just grey screens now and nothing is showing.
Error
Rendering failed with a known bug. Please try a rebuild.
The following classes could not be instantiated: - android.support.design.widget.CoordinatorLayout (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.AppCompatTextView (Open Class, Show Exception, Clear Cache) Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE. If this is an unexpected error you can also try to build the project, then manually refresh the layout. Exception Details java.lang.NoSuchFieldError: CoordinatorLayout at android.support.design.widget.CoordinatorLayout.(CoordinatorLayout.java:197) at android.support.design.widget.CoordinatorLayout.(CoordinatorLayout.java:189) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.inflate(LayoutInflater.java:495) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) Copy stack to clipboard
I have tried almost every solution put forward to me: Updating, Syncing Gradle, Rebuilding the Project, invalidate caches etc. But nothing seems to work. If anyone could understand the problem better then it would be much appreciated!
As I said, I know people have had this problem before, but none of their solutions are working for me.
Add Base in front of your Style with Base. Cheers to @filol for the thread.
<style name="AppTheme" parent="Theme.AppCompat.Light">
to
<style name="AppTheme" parent="Base.Theme.AppCompat.Light">
The bug has been reported to google :https://code.google.com/p/android/issues/detail?can=1&q=230569&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&id=230569
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With