Hi, I am using injecting coroutines. I am getting ...
# android
c
Hi, I am using injecting coroutines. I am getting this error
Copy code
error: <identifier> expected
    kotlin.coroutines.Continuation<? super dev.ciox.insyder.data.models.new.PostRemoteResponse> continuation);
My ApiService
Copy code
interface ArticleApiService {
    @GET("/api/posts?populate=%2A")
    suspend fun getAllArticles(): PostRemoteResponse
}
Retrofit provider
Copy code
@Provides
    @Singleton
    fun provideRetrofit(okHttpClient: OkHttpClient): Retrofit = Retrofit.Builder()
        .baseUrl("<http://localhost:1337/>")
        .client(okHttpClient)
        .addConverterFactory(MoshiConverterFactory.create())
        .build()
Dispatchers Provider
Copy code
@Retention(AnnotationRetention.BINARY)
@Qualifier
annotation class MainDispatcher

@Retention(AnnotationRetention.BINARY)
@Qualifier
annotation class IODispatcher

@Retention(AnnotationRetention.BINARY)
@Qualifier
annotation class DefaultDispatcher

@InstallIn(SingletonComponent::class)
@Module
object CoroutinesModule {

    @DefaultDispatcher
    @Provides
    fun provideDefaultDispatcher(): CoroutineDispatcher = Dispatchers.Default

    @IODispatcher
    @Provides
    fun provideIoDispatcher(): CoroutineDispatcher = <http://Dispatchers.IO|Dispatchers.IO>

    @MainDispatcher
    @Provides
    fun provideMainDispatcher(): CoroutineDispatcher = Dispatchers.Main
}