Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 0.4.1 breaks Android Studio preview #28

Open
GregSantulli opened this issue Aug 22, 2017 · 0 comments
Open

version 0.4.1 breaks Android Studio preview #28

GregSantulli opened this issue Aug 22, 2017 · 0 comments

Comments

@GregSantulli
Copy link

adding compile 'com.eyeem.recyclerviewtools:library:0.4.1' to gradle dependencies breaks Android Studio preview

I have reproduced the issue here

Works fine with v0.4.0

Android Studio 2.3.3
Build #AI-162.4069837, built on June 6, 2017
JRE: 1.8.0_112-release-b06 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

The xml preview window throws the following render error:

Failed to instantiate one or more classes

Rendering failed with a known bug. Please try a rebuild.  The following classes could not be instantiated:

- android.support.v7.widget.AppCompatImageView (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.CoordinatorLayout (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.AppBarLayout (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.FloatingActionButton (Open Class, Show Exception, Clear Cache)
- android.support.v7.widget.Toolbar (Open Class, Show Exception, Clear Cache)
- android.support.constraint.ConstraintLayout (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: ViewBackgroundHelper   at 
android.support.v7.widget.AppCompatBackgroundHelper.loadFromAttributes(AppCompatBackgroundHelper.java:46)   at android.support.v7.widget.AppCompatImageView.<init>
(AppCompatImageView.java:63)   at android.support.v7.widget.AppCompatImageView.<init>
(AppCompatImageView.java:56)   at 
java.lang.reflect.Constructor.newInstance(Constructor.java:423)   at 
android.view.LayoutInflater.onCreateView(LayoutInflater.java:717)   at 
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:785)   at 
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)   at 
android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858)   at 
android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)   at 
android.view.LayoutInflater.rInflate(LayoutInflater.java:834)   at 
android.view.LayoutInflater.inflate(LayoutInflater.java:492)   at 
com.android.layoutlib.bridge.bars.CustomBar.<init>(CustomBar.java:95)   at 
com.android.layoutlib.bridge.bars.NavigationBar.<init>(NavigationBar.java:52)   at 
com.android.layoutlib.bridge.bars.NavigationBar.<init>(NavigationBar.java:46)   at 
com.android.layoutlib.bridge.impl.Layout.createNavBar(Layout.java:284)   at 
com.android.layoutlib.bridge.impl.Layout.<init>(Layout.java:140) 

I have tried with multiple different versions of Android SDK, nothing seems to work.
I am using v0.4.0 for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant