Home > Mobile >  Unexpected tokens (use ';' to separate expressions on the same line) in build.gradle.kts w
Unexpected tokens (use ';' to separate expressions on the same line) in build.gradle.kts w

Time:10-30

i can not add rxjava and rxkotlin to build.gradle.kts in intellij-idea and it shows error like this

enter image description here

what i have to do? i don't understand

CodePudding user response:

You have a .kts ( Kotlin script ) file, implementation is a kotlin function here, and the dependency should be passed as an argument to it.

implementation ("io.reactivex.rxjava3:rxjava:3.1.5")
implementation ("io.reactivex.rxjava3:rxkotlin:3.0.1")
  • Related