gpt4 book ai didi

android - kapt3 构建生成的错误

转载 作者:太空宇宙 更新时间:2023-11-03 13:40:09 24 4
gpt4 key购买 nike

enter image description here

这是我的 gradle 的样子

//Dagger DI
implementation 'com.google.dagger:dagger:2.10'
kapt 'com.google.dagger:dagger-compiler:2.10'
compileOnly 'org.glassfish:javax.annotation:10.0-b28'

//Retrofit & OkHttp
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.google.code.gson:gson:2.8.2'

在构建之后它会生成带有错误的改造实现类,它们太多了,这是这个错误日志的一部分。

这是 Dagger 组件

   @Singleton
@Component(modules = [(RetrofitModule::class)])
interface AppDependencyComponent {

}

这是 RetrofitModule.class

@Module
class RetrofitModule {

@Provides
@Singleton
fun authenticateService(): AuthenticateService {
return RetrofitConfig().authenticateService
}
}

最佳答案

修复了更新,其中一个包名称是“abstract”,在 generateStubs 之后生成“com.bla.bal.abstract.Class”,其中 abstract 是语言修饰符,因此引发了错误

关于android - kapt3 构建生成的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53916788/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com