Open LazarRistic opened 4 years ago
Step 8 -> Using Dagger in the Main Flow -> 2. Error when building:
e: /Users/lazarristic/PersonalWorkspace/Android/Learning/Dagger/android-dagger/app/build/tmp/kapt3/stubs/debug/com/example/android/dagger/di/AppComponent.java:7: error: [Dagger/MissingBinding] android.os.UserManager cannot be provided without an @Inject constructor or an @Provides-annotated method. public abstract interface AppComponent { ^ android.os.UserManager is injected at com.example.android.dagger.main.MainActivity.userManager com.example.android.dagger.main.MainActivity is injected at com.example.android.dagger.di.AppComponent.inject(com.example.android.dagger.main.MainActivity)
Android Studio has imported
android.os.UserManager
instead ofcom.example.android.dagger.user.UserManager
Please add imports in code.
You just need remove that line,then re-import,done!
Step 8 -> Using Dagger in the Main Flow -> 2. Error when building:
e: /Users/lazarristic/PersonalWorkspace/Android/Learning/Dagger/android-dagger/app/build/tmp/kapt3/stubs/debug/com/example/android/dagger/di/AppComponent.java:7: error: [Dagger/MissingBinding] android.os.UserManager cannot be provided without an @Inject constructor or an @Provides-annotated method. public abstract interface AppComponent { ^ android.os.UserManager is injected at com.example.android.dagger.main.MainActivity.userManager com.example.android.dagger.main.MainActivity is injected at com.example.android.dagger.di.AppComponent.inject(com.example.android.dagger.main.MainActivity)
Android Studio has imported
android.os.UserManager
instead ofcom.example.android.dagger.user.UserManager
Please add imports in code.