Comments (2)
You don't need to do it. Dagger is already doing that for your. You can directly use your MainActivity in you module.
public class MainActivityModule{
@Provides
public MainView providesMainView(MainActivity activity) {...}
}
from dagger-android-injection.
I am getting error bellow. what is the problem. I did what you did in post.
Error:(29, 10) error: ....ui.main.MainActivityComponent.Builder cannot be provided without an @Provides-annotated method......ui.main.MainActivityComponent.Builder is injected at .......ActivityBuilder.bindMainActivity(builder)java.util.Map<java.lang.Class<? extends android.app.Activity>,javax.inject.Provider<dagger.android.AndroidInjector.Factory<? extends android.app.Activity>>> is injected atdagger.android.DispatchingAndroidInjector.(injectorFactories)dagger.android.DispatchingAndroidInjector<android.app.Activity> is injected at ....MYApp.activityDispatchingAndroidInjector ....MYApp is injected at .....di.AppComponent.inject(app)
from dagger-android-injection.
Related Issues (11)
- Question about AppComponent.java HOT 1
- Can't resolve symbol 'DaggerAppComponent' HOT 1
- How can I add modules to fragment binder? HOT 1
- can not get DaggerAppComponet HOT 1
- Dagger Android in Multi Modular Project HOT 1
- Where does dagger2 get mainvView? HOT 4
- problem to add NetworkModule HOT 1
- Will be the branch "ContributesAndroidInjector" merged into master? HOT 1
- Redundant presenter provides HOT 1
- Create a Kotlin version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dagger-android-injection.