PeopleInSpace | Kotlin Multiplatform project with SwiftUI , Jetpack Compose | Android library
kandi X-RAY | PeopleInSpace Summary
kandi X-RAY | PeopleInSpace Summary
Minimal Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Compose for Wear OS, Compose for Desktop, Compose for Web, and Kotlin/JS + React clients along with Ktor backend. Currently running on.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of PeopleInSpace
PeopleInSpace Key Features
PeopleInSpace Examples and Code Snippets
Community Discussions
Trending Discussions on PeopleInSpace
QUESTION
Working with Kotlin KMP and targeting macos and I am having trouble installing a ktor dependency.
Here is my shared module gradle file
...ANSWER
Answered 2021-Jul-05 at 12:40According to the documentation, Ktor's CIO engine is JVM-only. Try using curl
one:
QUESTION
I have a problem with setting up an activity that resides in shared code in a KMM project and uses Jetpack Compose. When the activity is in Android source (/app) this works fine. But I'd like to publish a shared (/common) library without any application.
As an example I forked a great minimal KMM+Compose project: https://github.com/cyberhenoch/PeopleInSpace :
- added the compose activity (SharedActivity) to the shared code
- updated the dependencies in shared code androidMain
It compiles fine but at runtime I get:
Process: com.surrus.peopleinspace, PID: 4067 java.lang.NoSuchMethodError: No static method setContent$default(Landroidx/activity/ComponentActivity;Landroidx/compose/runtime/CompositionContext;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V in class Landroidx/activity/compose/ComponentActivityKt; or its super classes (declaration of 'androidx.activity.compose.ComponentActivityKt' appears in /data/app/com.surrus.peopleinspace-8P35Dcwzn9_G-xN9YdwFrA==/base.apk) at com.surrus.android.SharedActivity.onCreate(SharedActivity.kt:12)
I tried to add the options described here https://developer.android.com/jetpack/compose/setup#configure_gradle but
- not all can be added to the common module (kotlinOptions?)
- in the original project they are not required and it works perfectly good
- after adding several of them in different combinations it does not even compile (exception: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/serialization/DescriptorSerializerPlugin at java.base/java.lang.ClassLoader.defineClass1(Native Method))
What should I do to make it work? Any help would be appreciated.
...ANSWER
Answered 2021-May-12 at 15:00That looks like a dependency error.
Check that you have androidx.activity:activity-compose:1.3.0-alpha07
added to androidMain
If it's already there - try adding all other dependencies you have in the android app module(that runs fine) added to your androidMain
QUESTION
After creating a KMM project with both Android and iOS apps working without issues. I tried adding a new target JVM to the project to implement a basic backend service.
I have seen this working in other projects such as https://github.com/joreilly/PeopleInSpace but even if I think it must be right in front of me, I am not able to tell the difference with this one.
I created a sample project to reproduce it: https://github.com/RafaO/Surf you can check it out and see that inside the JVM client the class Greeting
is not found.
Any ideas why this is happening are appreciated.
Thank you very much!
...ANSWER
Answered 2021-Apr-29 at 06:51I'm not sure if that's the only way, but I'm using multiplatform backend module with single jvm source set.
Example I've being using as a reference: https://github.com/JetBrains/kotlinconf-app
my own setup:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PeopleInSpace
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page