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

Incompatibility with EventBus on Android 6: NoClassDefFoundError #48

Open
francescopedronomnys opened this issue May 5, 2017 · 1 comment

Comments

@francescopedronomnys
Copy link

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

@passsy
Copy link
Owner

passsy commented May 5, 2017

Thanks for pointing this out I'll investigate this for future releases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants