Tracked at https://youtrack.jetbrains.com/issue/KT-30856
Steps to reproduce
This project was created from the Mobile Android/iOS Kotlin Multiplatform template.
-
Create local.properties with a correctly set
sdk.dir
property for the Android SDK -
Import project into IntelliJ Community Edition 2019.1 or idea-IU-191.6707.7 under Linux (Ubuntu 18.04 in my case)
-
Wait for synchronize with Gradle and indexing to complete
-
Build project - build succeeds
-
Open Sample.kt
- Expected: Sample.kt has no errors in the IDE
- Actual:
Expected property 'dispatcher' has no actual declaration in module intellij-kotlin-native-compile-errors.app.iosMain for Native The following declaration is incompatible because return type is different: public actual val dispatcher: [ERROR : CoroutineDispatcher] defined in sample in file SampleIos.kt
-
Open SampleIos.kt
- Expected: Sample.kt has no errors in the IDE
- Actual:
Unresolved reference: coroutines
Solution
- Update Gradle to 4.10
- Update Kotlin Gradle Plugin to 1.3.30
- Update coroutines dependencies to 1.2.0 and specify them for every module (common, ios, android)
Tested in IC 2019.1