I'm currently playing around with Kotlin multi platform feature and have a minor problem. When I start gradle multi-platform project in Intellij and use keywords 'actual' and 'expect', they are underlined in red and show message "The feature "multi platform projects" is experimental and should be enabled explicitly"
How can I explicitly enable multi platform feature? Thanks
Kotlin Multiplatform Mobile (KMM) is an SDK for cross-platform mobile development. You can develop multiplatform mobile applications and share parts of your applications between Android and iOS, such as core layers, business logic, presentation logic, and more.
Cross-platform development beyond mobile With Kotlin Multiplatform, you can create different multiplatform projects for multiple platforms, including web, desktop, and other native platforms. Kotlin applications will work on different operating systems, such as macOS, Windows, Linux, Android, iOS, watchOS, and others.
Kotlin Multiplatform Mobile (KMM)Kotlin is an excellent choice for creating mobile apps. Its conciseness, simplicity, and expressivity make it simple to develop correct and understandable code. If you're starting a new native Android project, Kotlin is the recommended language.
In Android Studio, select File | New | New Project. Select Kotlin Multiplatform App in the list of project templates, and click Next. Specify a name for your first application, and click Next. In the iOS framework distribution list, select the Regular framework option.
Finally found an answer. In Intellij in Preferences->Build, Execution, Deployment->Compiler->Kotlin Compiler append to Additional command line parameters: field command -Xmulti-platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With