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

java.lang.NoSuchFieldError #78

Closed
Ofiro opened this issue Dec 29, 2014 · 2 comments
Closed

java.lang.NoSuchFieldError #78

Ofiro opened this issue Dec 29, 2014 · 2 comments

Comments

@Ofiro
Copy link

Ofiro commented Dec 29, 2014

trying to add a bootstrap button and i get this errors
Rendering Problems The following classes could not be instantiated:
- com.beardedhen.androidbootstrap.BootstrapButton (Open Class, Show Exception)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE Exception Details java.lang.NoSuchFieldError: layout   at com.beardedhen.androidbootstrap.BootstrapButton.initialise(BootstrapButton.java:186)   at com.beardedhen.androidbootstrap.BootstrapButton.(BootstrapButton.java:108)   at java.lang.reflect.Constructor.newInstance(Constructor.java:408)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:806)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:809)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:809)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)   at android.view.LayoutInflater.inflate(LayoutInflater.java:504)   at android.view.LayoutInflater.inflate(LayoutInflater.java:385) Copy stack to clipboard

@Ofiro
Copy link
Author

Ofiro commented Dec 29, 2014

this is my xml

<com.beardedhen.androidbootstrap.BootstrapButton
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Test"
bootstrapbutton:bb_icon_left="fa-check-square-o"
bootstrapbutton:bb_icon_right="fa-hand-o-right"
bootstrapbutton:bb_roundedCorners="true"
bootstrapbutton:bb_type="primary"
android:paddingBottom="5dp"
android:paddingTop="5dp"/>

added xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
on top of the xml file.

@jamie-beardedhen
Copy link
Contributor

It looks like this is a duplicate of #76 (previewing layouts doesn't work on Android Studio 1.0). Feel free to reopen this ticket if you can reproduce the problem when running your app on a real device.

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

2 participants