Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixpanel using legacy support libs in reflection calls - can't drop jetifier due to this #717

Closed
carstenhag opened this issue Dec 11, 2020 · 2 comments

Comments

@carstenhag
Copy link

carstenhag commented Dec 11, 2020

See dipien/bye-bye-jetifier#15 and specifically the comment dipien/bye-bye-jetifier#15 (comment).

Jetifier is used on android to make old code that uses legacy android support libraries work with newer androidx libraries. It is really useful at that, but it comes with the disadvantage of increasing build times, see this article.

Mixpanel seems to use android.support.v4.content.LocalBroadcastManager inside https://github.com/mixpanel/mixpanel-android/blob/master/src/main/java/com/mixpanel/android/mpmetrics/MixpanelAPI.java via reflections for something.

You should probably straight up either remove the old one and use androidx, or do like AppCenter and attempt the reflection calls with either the old or the new package/class. See https://github.com/microsoft/AppCenter-Test-Espresso-Extensions/blob/master/src/main/java/com/microsoft/appcenter/espresso/Factory.java for that.

@carstenhag
Copy link
Author

I could probably drop jetifier without this change/fix, as it's probably not checked at compile-time whether reflection calls will succeed. But then I am at risk of runtime crashes when Mixpanel calls that code.

@zihejia
Copy link
Contributor

zihejia commented Oct 7, 2021

hi @carstenhag, we have released v5.9.2 which has the fix. I'm closing this one now.

@zihejia zihejia closed this as completed Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants