Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Incompatibility with EventBus on Android 6: NoClassDefFoundError #48

@francescopedronomnys

Description

@francescopedronomnys

Hello,
this is not a bug report, just would like to point it out for other people having same issue.
I'm using this library with GreenRobot's EventBus. On some devices running Android 6 you could get NoClassDefFoundError telling that android.view.DragAndDropPermissions does not exists. This is correct because DragAndDropPermissions has been added on API level 24 and happens because of what explained here under "A java.lang.NoClassDefFoundError is throw when a subscriber class is registered. What can I do?".

Only solution I've found after following every suggestion on EventBus' FAQ has been to modify CompositeAndroid removing from library's classes the override of methods that returns a DragAndDropPermissions. Obviously I know that this could break your library, but I'm not using that methods in my activities.
If anyone could suggest a better method it will be appreciated.

If anyone has the same problem: I've forked this repo and published on jitpack.io a release with the mentioned workaround: https://jitpack.io/#francescopedronomnys/CompositeAndroid/25.3.1-1000

Bye, Francesco

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions