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

Crashing when using other dependency that use ScreenEz internally #1

Closed
4 tasks done
dofire opened this issue Jul 31, 2023 · 1 comment
Closed
4 tasks done
Labels
Bug Something isn't working

Comments

@dofire
Copy link
Owner

dofire commented Jul 31, 2023

Steps to reproduce

  1. Implement any dependency/library that used ScreenEz internally (but with different version, eg: 0.0.2 vs 0.0.3)
  2. Call ScreenEz.with(context)
  3. Build & run the app

Expected behavior

Run normally

Actual behavior

Crashing when the code is calling

Crash logs

FATAL EXCEPTION: main

Process: com.langhance.dictionary, PID: 2637
java.lang.IncompatibleClassChangeError: The method 'void com.torrydo.screenez.ScreenEz.with(android.content.Context)' was expected to be of type virtual but instead was found to be of type static (declaration of 'com.torrydo.floatingbubbleview.FloatingBubbleService' appears in /data/app/~~V2Q-OUOPR5-IIqkajbuEaw==/com.langhance.dictionary-6W1PtBwbnGIEr9bhujKuZg==/base.apk!classes19.dex)
at com.torrydo.floatingbubbleview.FloatingBubbleService.onCreate(FloatingBubbleService.kt:56)
at ...

ScreenEasy version

0.0.3

Android version

Android 13

Device

Google Pixel 6 pro (AVD)

Other details

No response

Acknowledgements

@dofire dofire added the Bug Something isn't working label Jul 31, 2023
@dofire dofire changed the title IncompatibleClassChangeError: The method 'void com.torrydo.screenez.ScreenEz.with(android.content.Context)' was expected to be of type virtual but instead was found to be of type static (declaration of 'com..' appears in /...) Crashing when using other dependency that use ScreenEz internally Jul 31, 2023
@dofire
Copy link
Owner Author

dofire commented Aug 1, 2023

the reason why this error appear is:
in v0.0.3, I marked the with(context) method with @JvmStatic so that Java can use it as a static method. This error should be gone now.

@dofire dofire closed this as completed Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant