我正在開發一個Android應用程序,並希望使用Dagger作爲我的DI框架。但我不知道如何注入使用回調的依賴關係。 比如我想要得到的位置,我用GoogleApiClient此: public class LocationProvider implements ILocationProvider,
GoogleApiClient.ConnectionCallbacks,
可以說我有: public interface Shape {}
public class Rectangle implements Shape {
}
public class Circle implements Shape {
}
和我有一個ApplicationModule其中需要提供實例兩者建議和圈: @Module
public class Application
我試圖用匕首2我的項目中實施改造,這讓我下面的錯誤: Error:(22, 10) error: com.toranj.tyke.restApi.LotteryApiInterface cannot be provided without an @Provides- or @Produces-annotated method.
com.toranj.tyke.restApi.LotteryApi