-
Notifications
You must be signed in to change notification settings - Fork 164
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
Error inflating class com.ncorti.slidetoact.SlideToActView #120
Comments
This might not necessarily be a library bug but an error in your code (which seems more likely be the case). Please attach your layout XML file which uses the SlideToActView, if possible with line numbers. |
Now the XML preview in Android Studio magically shows the preview of the swipe button and not the placeholder as before. The crash is still there though. Here is the XML:
|
The placeholder gets rendered correctly once you build the app and run it. For the crash, are you using AndroidX or the old support library? |
I am confused. Does you library have dependencies not documented in the README? In the README it says to just add
and that's it. I am using AndroidX for other components as you can see in the layout code I posted above, but I have not added anything else (aside from the above) that is related to your library.
|
The library internally has two dependencies: the Kotlin stdlib and androidx.appcompat. You anyway don't need to declare them as they will be imported automatically.
Yeah you're right. So the crash seems to be related to the inflating of the
I can't find anything wrong with your layout. Ideally if you could share a project where the crash occur, it would be really beneficial to help debugging. |
Unfortunately I do not have the time to create a project to share right now. However, I can confirm that the problem is with |
I assume you don't have
If that is missing the consuming app seems to crash with the stacktrace you reported. |
What kind of issue is this?
UI Bug. Please provide a Screenshot/Video/GIF of what's the problem. If you need help to record a video you can follow this guide
Functional Bug. Please describe the scenario of the bug. Furthermore, please spend the time to write a failing test.
Feature Request. Start by telling what's problem you’re trying to solve. A Pull request is welcome as well.
Details
In Android Studio, in the XML preview, I can only see a placeholder where the slider should be. I have followed the instructions in the readme.
When I try to run it on the device I get this error:
and below also this
In case of bug report, please don't forget to include also:
The text was updated successfully, but these errors were encountered: