Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Lans opened this issue Mar 8, 2024 · 2 comments
Labels
invalid This doesn't seem right

Comments

@Lans
Copy link

Lans commented Mar 8, 2024

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
Copy link
Collaborator

kymjs commented Mar 9, 2024

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

@Lans
Copy link
Author

Lans commented Mar 9, 2024 via email

@Lans Lans closed this as completed Mar 10, 2024
@kymjs kymjs added the invalid This doesn't seem right label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants