Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

407
Views
No type arguments expected for class Flow

I encountered a problem with Kotlin Flow.

I copied the following code code from the Official guide

fun simple(): Flow<Int> = flow { 
    for (i in 1..3) {
        delay(100) 
        emit(i) 
    }
}

But the Android Studio prompts a following error:

No type arguments expected for class Flow

What am I doing wrong?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Make sure you use import kotlinx.coroutines.flow.Flow not java.util.concurrent.Flow, it gives you this error because Java concurrent Flow class take 0 type arguments, but Coroutines Flow take one

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!