HuolalaTech / hll-wp-therouter-android

A framework for assisting in the renovation of Android componentization(帮助 App 进行组件化改造的动态路由框架)
https://therouter.cn/
Apache License 2.0
1.07k stars 128 forks source link

interface com.qx.common.provider.IRoomService is interface, but do not have @ServiceProvider #148

Closed Lans closed 4 months ago

Lans commented 4 months ago

AGP8, [therouter-android]1.2.1,

module:common->IRoomService ,

module:A->

@ServiceProvider(returnType = IRoomService::class)
fun provideRoomService(): IRoomService = object : IRoomService {
    override fun getRoomId(): String {
        return "provideRoomService"
    }
}

@ServiceProvider(returnType = IRoomService::class)
class RoomProvider : IRoomService {
    override fun getRoomId(): String {
        return "1111"
    }

}

module B

 val iRoomService = TheRouter.get(IRoomService::class.java)
                val roomId = iRoomService?.getRoomId()
                println("roomId:${roomId}")

module A、B 全都api(“:common”)

kymjs commented 4 months ago

检查一下有没有引入apt或ksp

Lans commented 4 months ago

没个都加了ksp

来自 MEIZU 20

-------- 原始邮件 -------- 发件人:张涛 @.> 时间:2024年3月9日 11:05 收件人:HuolalaTech/hll-wp-therouter-android @.> 抄送:Lans @.>,Author @.> 主题:Re: [HuolalaTech/hll-wp-therouter-android] interface com.qx.common.provider.IRoomService is interface, but do not have @ServiceProvider (Issue #148)

检查一下有没有引入apt或ksp

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/HuolalaTech/hll-wp-therouter-android/issues/148#issuecomment-1986707069", "url": "https://github.com/HuolalaTech/hll-wp-therouter-android/issues/148#issuecomment-1986707069", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]