https://kotlinlang.org logo
Title
f

flygerian.eagle

02/02/2022, 4:11 AM
Hi, I'm Ini... I recently hopped on the kotlin boat I'm using 'kotlin apprentice' as a reference - by R. Wenderlich - currently I'm studying coroutines... My issue: kotlinx dependency isn't building...so I used Retrofit dep (build.gradle) cuz Retro includes coroutines out of the box 🎁 Retro dep builds...autocomplete for kotlinx.coroutines.* works, yet features are red - dispatchers, launch, run blocking etc... I'll search to see if anyone else has this problem here anyways I'm proud to meet you guys and I hope we can do some work - good work together! #coroutines
j

Joffrey

02/02/2022, 8:42 AM
How are you adding the dependency on kotlinx.coroutines? Is the build failing when you run Gradle from command line or only from the IDE? What's the error then?
f

flygerian.eagle

02/04/2022, 1:01 AM
n

Nick Allen

02/04/2022, 2:32 AM
Maybe try deleting that space in front of 1.6.0?
4
f

flygerian.eagle

02/07/2022, 1:12 AM
Nick, the build was success...yet red everywhere...
j

Joffrey

02/07/2022, 9:15 AM
When you say the build is a success, are you running it from command line or from the IDE? If from the command line, which command? If from the IDE, how? Is it via a run configuration or a task in the Gradle panel? Did you try refreshing the Gradle configuration after your change in
build.gradle.kts
? (clicking the "refresh" button in the Gradle tool window)
f

flygerian.eagle

02/11/2022, 3:03 AM
Hi J, from Ide: success, via task in Gradle panel, from Terminal: errors - using command: kotlinc -script /Users/ubom/Documents/com/example/_coroutines23/build.gradle.kts And yes, I 'refreshed'
l

louiscad

02/11/2022, 7:25 AM
That's expected, you should run Gradle, not kotlinc to get Gradle scripts live.
1
j

Joffrey

02/11/2022, 11:33 AM
The error on the screenshot does look genuine though, what does the source file look like? Are you trying to pass a
Job
where an
Int
is expected?
f

flygerian.eagle

02/22/2022, 11:19 AM
Hi guys, Initially, I had issues getting kotlinx v.1.6.0 library dep to compile. I viewed https://github.com/BracketCove/GraphSudokuOpen/blob/3bade15d8d34824febb573af966c2c182263d0fc/app/build.gradlerepo, used v.1.5.0 - and bam - my coroutines import is w/o redness; my code compiles. Sweet. Thnx guys.
:stackoverflow: 1