karottenreibe / intellij-kotlin-multiplatform-compile-errors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tracked at https://youtrack.jetbrains.com/issue/KT-30856

Steps to reproduce

This project was created from the Mobile Android/iOS Kotlin Multiplatform template.

  1. Create local.properties with a correctly set sdk.dir property for the Android SDK

  2. Import project into IntelliJ Community Edition 2019.1 or idea-IU-191.6707.7 under Linux (Ubuntu 18.04 in my case)

  3. Wait for synchronize with Gradle and indexing to complete

  4. Build project - build succeeds

  5. 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
    
  6. 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

About


Languages

Language:Kotlin 63.1%Language:Swift 36.9%