Open kfrancis opened 4 months ago
Started trying to make sense of this here: https://github.com/kfrancis/Plugin.Maui.Intercom
Getting closer, able to call initialize but when trying to render the component I'm getting:
Java.Lang.NoClassDefFoundError: 'Failed resolution of: Landroidx/compose/runtime/internal/ComposableLambdaKt;'
Still a mess of dependencies, and the error it's mentioning isn't a direct one but rather transient from one of the material dependencies: https://mvnrepository.com/artifact/io.intercom.android/intercom-sdk-base/15.10.1
Hi, @kfrancis - thanks for using Maui.NativeLibraryInterop and reporting this issue. It appears that you might be missing some dependencies that your binding library of interest requires. In case it is helpful, I have a sample that includes an Android binding with its dependencies at https://github.com/rachelkang/MauiCharts and more information about my process in a blog post .
@rachelkang I did check the blog post and your source, but I don't see where my issue lies. I mean, Intercom has many runtime dependencies whereas your project is single-dependency. In particular, the compose dependency seems to be more problematic than others - but I'm not sure where I'm going about it wrong.
Any further suggestions? I put the source on github in the hopes that it might be useful to see what's going on in a far more dependency-complex scenario.
Hi, @kfrancis - I recommend double-checking the versions of your dependencies and ensuring they're all compatible with one another / there is no mismatch. If you continue to have issues, I recommend consulting on the issue with the library, as it may be a compatibility issue they have with Android.
Similar Java.Lang.NoClassDefFoundError: 'Failed resolution of: Landroidx/compose/runtime/internal/
type issues seem to commonly be due to version mismatches - e.g. https://stackoverflow.com/questions/66429770/jetpack-compose-fails-with-noclassdeffounderror-failed-resolution-of-landroidx
Hi @kfrancis I'm dealing with a similar situation for Android. I'm able to compile with no issue but when I try to initialize the native Android Binding library at runtime, I get a 'java.lang.ClassNotFoundException' exception. I'm thinking the native library has run-time dependencies as well. Question: The dependencies you've listed on your Aug 7 post, are those all the dependencies that your binding needs or did you come up with that list some other way? I ask because the dependencies list at Maven show several more than that post. Thanks for your post!
I was mainly going from Intercom's android example, but yes - I agree, Maven lists far more.
This is rough, because I'm trying to migrate from Xamarin in which someone kindly had and relatively maintained bindings and it worked great but they aren't and it doesn't, and the binding story for Maui is in it's infancy and complex.
I've been trying to create a binding for Intercom, but I'm struggling to run it on Android even though it's all building. Can there be a sample that has a deeper dependency tree and includes Android? Right now, the Facebook example is the only Android example but there are no run-time dependencies only compile-time.
Perhaps an example that packs up the work into a plugin? https://github.com/jfversluis/Plugin.Maui.Feature
Links: