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
Can't generate DaggerAppComponent after update to dagger2.12 #942
Comments
Can you create a github repo which exhibits the issue? This is essentially the same thing you posted inj #938. |
I have 2 custom scope @PerActivity @Subcomponent(modules = HomeMemberModule.class)
public interface HomeActivityComponent {
HomeActivity inject(HomeActivity activity);
AppsContainerActivity inject(AppsContainerActivity activity);
NavigationFragment inject(NavigationFragment fragment);
@Module class HomeMemberModule extends MemberModule<AppCompatActivity> {
public HomeMemberModule(AppCompatActivity activity) {
super(activity);
}
@Provides PagerAdapter providesPagerAdapter() {
return new PagerAdapter(mObject2Inject.getSupportFragmentManager());
}
}
OwnTaskComponent plus(OwnTaskComponent.Module module);
ParticipantsTaskComponent plus(ParticipantsTaskComponent.Module module);
TaskTeamComponent plus(TaskTeamComponent.Module module);
CrmHomeFragComponent plus(CrmHomeFragComponent.CrmHomeFragModule module);
ContactsComponent plus(ContactsComponent.ContactsModule module);
AppsComponent plus(AppsComponent.AppsFragmentModule module);
UserCenterComponent plus(UserCenterComponent.UserCenterModule module);
OwnActivitiesComponent plus(OwnActivitiesComponent.OwnActivitiesModule module);
OwnClientsComponent plus(OwnClientsComponent.OwnClientsPresenterModule module);
TeamComponent plus(TeamComponent.TeamPresenterModule module);
} @PerActivity @Subcomponent(modules = Module.class) public interface OwnTaskComponent {
void inject(OwnTaskFragment fragment);
@dagger.Module class Module extends MemberModule<OwnTaskFragment> {
public Module(OwnTaskFragment object2Inject) {
super(object2Inject);
}
@PerActivity @Provides OwnTaskContract.View provideView() {
return mObject2Inject;
}
}
} And I inject public abstract class BaseUserActivity extends BaseActivity {
@Inject protected UserManager mUserManager;
@Override protected void initInjection() {
App.get(this).getAppComponent().inject(this);
setupUserComponent();
}
private void setupUserComponent() {
isUserSessionStarted = mUserManager.isUserSessionStartedOrStartSessionIfPossible();
UserComponent userComponent = mUserManager.getUserComponent();
onUserComponentSetup(userComponent);
if (!isUserSessionStarted) {
finish();
}
}
protected abstract void onUserComponentSetup(UserComponent component);
} Could the problems arise between them? |
@ronshapiro I find I had post wrong info, so I create new issue. |
I recommend asking on stack overflow. It's better for questions. If you want to try and use |
After clean and recompile my Android project, it build failed and throws such error:
cannot find symbol class DaggerAppComponent
.Same issue occurs in 2.10/2.11/2.12, but it build success in dagger2.7.
This question has been bothering me for a long time, and I have no idea what the reason is.
I hope I can get some useful help or guidance here. Thanks for your reading.
My dependency:
The text was updated successfully, but these errors were encountered: