dagger-reflect icon indicating copy to clipboard operation
dagger-reflect copied to clipboard

Issue with proguard

Open ivazhnov opened this issue 5 years ago • 2 comments

Does not seem to work with obfuscation. I tried to keep classes, but no luck.

Warning: dagger.reflect.ReflectiveAndroidInjector: can't find superclass or interface dagger.android.AndroidInjector
Warning: dagger.reflect.ReflectiveAndroidInjector$Factory: can't find superclass or interface dagger.android.AndroidInjector$Factory
Warning: dagger.reflect.ReflectiveAndroidInjector: can't find referenced class dagger.android.AndroidInjector
Warning: dagger.reflect.ReflectiveAndroidInjector: can't find referenced class dagger.android.AndroidInjector
Warning: dagger.reflect.ReflectiveAndroidInjector$Factory: can't find referenced class dagger.android.AndroidInjector$Factory
Warning: dagger.reflect.ReflectiveAndroidInjector$Factory: can't find referenced class dagger.android.AndroidInjector
Warning: dagger.reflect.ReflectiveAndroidInjector$Factory: can't find referenced class dagger.android.AndroidInjector
Warning: dagger.reflect.ReflectiveAndroidInjector$Factory: can't find referenced class dagger.android.AndroidInjector
Warning: dagger.reflect.ReflectiveAndroidInjector$Factory: can't find referenced class dagger.android.AndroidInjector$Factory
Warning: dagger.reflect.ReflectiveModuleParser: can't find referenced class dagger.android.ContributesAndroidInjector
Warning: dagger.reflect.ReflectiveModuleParser: can't find referenced class dagger.android.ContributesAndroidInjector
Warning: dagger.reflect.ReflectiveModuleParser: can't find referenced class dagger.android.AndroidInjector
Warning: dagger.reflect.ReflectiveModuleParser: can't find referenced class dagger.android.AndroidInjector$Factory
Warning: dagger.reflect.ReflectiveModuleParser: can't find referenced class dagger.android.ContributesAndroidInjector

ivazhnov avatar Feb 22 '20 18:02 ivazhnov

Looks like ProGuard is trying to find dagger-android classes to know what can be processed and how. If you don't have that dependency, add it. runtimeOnly should be enough, that way you won't see the dagger-android classes during development.

Side note: are you trying to use this in production? or just testing with proguard?

TWiStErRob avatar Feb 22 '20 18:02 TWiStErRob

I tried that and it did not help. (that is not for production, testing for now) @TWiStErRob

ivazhnov avatar Feb 23 '20 16:02 ivazhnov