Comments (13)
Does this module have the compose dependencies set up? It looks like you might not have the compose dependencies in the new module where you moved this root to.
from showkase.
Wanted to check again and see if you were able to resolve this issue with what I recommended
from showkase.
I didn't get to it yet. But the 'app' module doesn't have Compose dependencies, so it's most likely the cause.
from showkase.
Yeah that checks out as that's what the stack trace was pointing to as well.
from showkase.
Hi @vinaygaba. I have added compose dependencies to the app module and the error is gone and I can build the project.
However when I start the ShowKase activity, it crashes with this exception:
java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V in class Lcom/airbnb/android/showkase/models/ShowkaseBrowserComponent; or its super classes (declaration of 'com.airbnb.android.showkase.models.ShowkaseBrowserComponent' appears in /data/app/com.jll.mya.dev-IRMZ1MPZPHA3rYtalM9CxA==/base.apk!classes13.dex)
at com.jll.jet.app.showkase.ShowKaseSetupCodegen.<init>(ShowKaseSetupCodegen.kt:41)
at java.lang.Class.newInstance(Native Method)
at com.airbnb.android.showkase.ui.ShowkaseBrowserActivity.getShowkaseProviderElements(ShowkaseBrowserActivity.kt:61)
at com.airbnb.android.showkase.ui.ShowkaseBrowserActivity.access$getShowkaseProviderElements(ShowkaseBrowserActivity.kt:19)
at com.airbnb.android.showkase.ui.ShowkaseBrowserActivity$onCreate$1.invoke(ShowkaseBrowserActivity.kt:31)
at com.airbnb.android.showkase.ui.ShowkaseBrowserActivity$onCreate$1.invoke(ShowkaseBrowserActivity.kt:26)
Any ideas?
from showkase.
Any updates @vinaygaba? It's currently blocking usage of the library and I don't know how to proceed (only to for library and modify it somehow). I promise that if this is solved, I will write a blogpost a promote this library :)
from showkase.
@davidvavra I was on vacation, sorry about th delay! These kind of errors are usually when you are using a different version of kotlin/Compose than what the library is using. Could you tell me which version of compose you are trying it with?
from showkase.
This library is using 1.0.3. I can probably publish the library with the latest version if compose of that helps. Unfortunately this is a Compose related nuance as they build against specific versions of Kotlin
from showkase.
I checked and we are using same versions - Compose 1.0.3 and Kotlin 1.5.30. It was working when the root module was a nested module and not 'app' module, so I think the problem is somewhere else.
from showkase.
@vinaygaba I spent hours debugging dependencies and then I found out this was missing:
buildFeatures {
compose = true
}
🤦♂️
So the issues is solved, but I think documentation should be improved (with dependency requirements for root module).
from showkase.
This is actually a compose requirement and has very little to do with Showkase. Since it's a Jetpack Compose only library, the assumption is that Compose is setup to work correctly in your codebase.
from showkase.
Our case is that all UI is in feature modules and those modules have correct Compose dependencies. We try to keep app
module minimalistic, just Application
object and necessary library setup. There is no UI so no Compose dependencies. But the app
module is the only one with dependencies to all feature modules, so it needs to be root module for Showkase. And it wasn't obvious to me it also needs all the Compose setup.
from showkase.
Sounds like I can maybe add this detail in the setup to be explicit that Compose dependencies were needed. I'm glad it resolved for you though! Excited for you to try it out :)
from showkase.
Related Issues (20)
- adding a new property into @ShowkaseComposable to generate or not the screenshot with Paparazzi integration HOT 1
- Showkase.getBrowserIntent() not generated when there are no showkase previews HOT 1
- Update compileSdk to 34 and fix deprecation warning HOT 2
- UI components are not showing up (yet groups are) HOT 4
- Showkase was not able to find the root class that youpassed to @ShowkaseScreenshot. Make sure that you have configured Showkase correctly. HOT 2
- Paparazzi + Showkase Integration - java.io.FileNotFoundException (File name too long) HOT 5
- PreviewParameters don't work with Kotlin 1.9 HOT 1
- Incorrect generate ShowcaseBrowser color with kotlin 1.9 HOT 2
- Updating compileSdkVersion to 34 causes deceprecation errors for newInstance() HOT 2
- exported ShowkaseBrowserActivity HOT 3
- Incompatibility with Dagger 2.48 HOT 7
- Is that possible to download an image from url? HOT 2
- Showkase silently ignores duplicate ShowkaseComposables
- IllegalStateException on ShowkaseMultiPreviewCodegenMetadata HOT 6
- When using Showkase version 1.01 or 1.0.2 I get this error "error: cannot find symbol - import androidx.room.util.RelationUtil; " HOT 1
- old account label bypassing all fraud measures HOT 1
- Multi module: same package name leads to silently ignoring previews
- Class file has wrong version 61.0, should be 55.0 HOT 1
- Showkase ignoring the Locale parameter for @Preview
- Feature Request: Compose Multiplatform Support HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from showkase.