Anyone else getting unresolved references after mi...
# announcements
l
Anyone else getting unresolved references after migrating from experimental to 1.3?
o
Some details about an error would be helpful
l
Upgraded Kotlin plugin and version to 1.3.0 Removed
Copy code
kotlin {
    experimental {
        coroutines "enable"
    }
}
Replaced
Copy code
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.19.3'
With
Copy code
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.0'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0'
Now I’m getting unresolved reference: DefaultDispatcher, lauch, UI, etc
y
did you remove ‘experimental’ from all the import statements?
l
Imports changed from
Copy code
import kotlinx.coroutines.experimental.DefaultDispatcher
import kotlinx.coroutines.experimental.launch
import kotlin.coroutines.experimental.CoroutineContext
import kotlinx.coroutines.experimental.android.UI
to
Copy code
import kotlinx.coroutines.DefaultDispatcher
import kotlinx.coroutines.launch
import kotlin.coroutines.CoroutineContext
import kotlinx.coroutines.android.UI
@yole yes (the migrations tool did that)
l
@luke_c Would you send a screenshot of the imports here in this thread?
l
After running migrations
l
@luke_c After checking the dependencies are properly resolved, I'd try a gradle build from command line to see if it compiles, and if it does, try invalidate caches and restart. Otherwise, try to fix compilation issues, and let us know of any struggle or success
v
please read the migration guide: https://github.com/Kotlin/kotlinx.coroutines/blob/master/COMPATIBILITY.md#migration-to-100-version-with-kotlin-13 There was a lot of changes between
0.19.0
and
1.0.0
and some of them were breaking (e.g. removal of
DefaultDispatcher
). In version
0.30.2
all such API is deprecated with proper replacements, so it is worth to update to 0.30.2 first
👍 4
l
perfect, thanks