Skip to content

Generated classes are not accessible in Android < 5 #266

@cheskos

Description

@cheskos

Hello.

I've been working on a project that uses this great library along with Autodagger for the past pair of months. My main test devices are Genymotion emulators loaded with KitKat and Lollipop and I switch between them indistinctively.

Yesterday I found out that running the project on either emulator or a real device with 4.x causes the following exception:

11-20 15:36:31.637 7189-7189/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.chiskosystems.debito.DebitoAppModule_ProvideRestAdapterFactory
    at com.chiskosystems.debito.DaggerDebitoAppComponent.initialize(DaggerDebitoAppComponent.java:30)
    at com.chiskosystems.debito.DaggerDebitoAppComponent.<init>(DaggerDebitoAppComponent.java:19)
    at com.chiskosystems.debito.DaggerDebitoAppComponent.<init>(DaggerDebitoAppComponent.java:11)
    at com.chiskosystems.debito.DaggerDebitoAppComponent$Builder.build(DaggerDebitoAppComponent.java:72)
    at com.chiskosystems.debito.DebitoApp.setupComponent(DebitoApp.java:130)
    at com.chiskosystems.debito.DebitoApp.onCreate(DebitoApp.java:75)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4151)
    at android.app.ActivityThread.access$1300(ActivityThread.java:130)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4745)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    at dalvik.system.NativeStart.main(Native Method)

but it runs fine in > 5.0

If I launch a

find /path/to/my/project -name DebitoAppModule_ProvideRestAdapterFactory.java

I get a result. Any pointers on to what can be wrong will be greatly appreciated.

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions