-
Notifications
You must be signed in to change notification settings - Fork 59
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
method in converted class has illegal modifiers: 0xA #23
Comments
Are you able to share either the whole APK or the specific class file where this issue occurs? |
Attached is a barebones app where I can reproduce the problem. Adding classes.jar (generated by d2j-dex2jar.sh) to my classpath and calling
|
Sorry, I thought I had responded here: Yes, I indeed think that it might be the |
Hi @ThexXTURBOXx, have you had a chance to look into this further? |
I tagged this PR as being part of |
bump Is there a workaround I might be able to use here? I just need to determine class hierarchy, so the attribute mismatch shouldn't be fatal. |
Alas, I am not sure if there is something, I am sorry. But honestly, I also have not yet had enough time to dig a bit deeper into this. I hope to be able to do this after finishing my Master's Thesis, but that will still take a while... |
I understand. Good luck on your thesis! |
dex2jar successfully converts the classes in my apk to a jar file.
However, while attempting to inspect those classes in a desktop application with Class.forName(name, false) (note the initialize = false arg), I see this error:
error: unable to process AboutBottomSheet.kt: Method $jacocoInit in class androidx/lifecycle/HasDefaultViewModelProviderFactory has illegal modifiers: 0xA
After some investigating, I'm guessing this corresponds to a default modifier in the HasDefaultViewModelProviderFactory interface (defined by Android):
This modifier was introduced in Java 8 (52), but the Android classes are for Java 6 (50).
So I believe the error results from a newer modifier in an older class version where it was not supported.
Can someone with greater knowledge confirm this suspicion, or comment on what else might be going on?
Incidentally, I tried converting that class to level 52 with d2j-class-version-switch.sh, but the problem remains.
The text was updated successfully, but these errors were encountered: