google / dagger

A fast dependency injector for Android and Java.
https://dagger.dev
Apache License 2.0
17.42k stars 2.01k forks source link

Unable to see Dagger errors #412

Closed austynmahoney closed 8 years ago

austynmahoney commented 8 years ago

Dagger2 v2.5 android-apt v1.8

Whenever I am messing around with my Modules and Components, I sometimes need a Dagger annotation processor error message to figure out what is going on. The problem is, whenever I compile with an incorrect Dagger setup I get error messages unrelated to the root cause. The error messages given in Android Studio are just missing symbol errors because the annotation processing failed.

Compiler error messages:

error: cannot find symbol class DaggerApplicationComponent
{redacted}/app/src/main/java/{redacted}/ProfileSettingsFragment.java
Error:(7, 50) error: package {redacted}.databinding does not exist
Error:(16, 9) error: cannot find symbol class FragmentProfileSettingsBinding

This databinding symbol error is then repeated about 100 times, and the actual problem that made the annotation processing fail is nowhere to be found.

What is eating the Dagger errors? Are they being fed to Android Studio properly?

ronshapiro commented 8 years ago

Looks like a dupe of #306