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

jar2dex min sdk version issue #603

Open
misterti opened this issue Sep 22, 2023 · 6 comments
Open

jar2dex min sdk version issue #603

misterti opened this issue Sep 22, 2023 · 6 comments

Comments

@misterti
Copy link

misterti commented Sep 22, 2023

I used dex2jar to get the jar, then immediately running jar2dex gives this error:
defining a static interface method requires --min-sdk-version >= 24 (currently 13)
Actually it's a set of warnings which eventually gives fatal error:
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow

What is this referring to?

@ThexXTURBOXx
Copy link
Collaborator

You need to run jar2dex with the following parameter: --min-sdk-version 24 (or some number bigger than 24).
For the last exception, you need to provide more information, i.e., the complete stack trace.
But first, please try running jar2dex with that parameter above

@misterti
Copy link
Author

There is no jar2dex executable in the package, only d2j-jar2dex.bat/sh script, which doesn't accept this parameter

@misterti
Copy link
Author

misterti commented Sep 22, 2023

i found --sdk switch, i don't know how i missed it. There is no warning anymore, but the fatal error is still there.
How do i go about it?

The stack that is currently output from the command is:

Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:614)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:310)
at com.android.dx.command.dexer.Main.runDx(Main.java:288)
at com.android.dx.command.dexer.Main.main(Main.java:244)
at com.android.dx.command.Main.main(Main.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.googlecode.dex2jar.tools.Jar2Dex.doCommandLine(Jar2Dex.java:84)
at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:297)
at com.googlecode.dex2jar.tools.Jar2Dex.main(Jar2Dex.java:14)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:606)
... 11 more

@misterti
Copy link
Author

So i see now that i used ThexXTURBOXx/dex2jar v72 which is from your repository @ThexXTURBOXx. This one indeed supports --sdk switch, while this version does not.
Should i open new issue at your repo?

@google-mirror
Copy link

java -Xms512m -Xmx2048m -cp "%CP%" com.android.dx.command.Main --dex --min-sdk-version=24 --no-strict

@vramasam
Copy link

Hello @misterti @ThexXTURBOXx

Can you please help here what is the potential reason for this issue. I used SNAPSHOT 2.2 , where I didn't face this issue, now trying to update latest 2.4 getting this error. Kindly provide valuable input.

MacBook-Pro dex2jar-2.0 % ./d2j-jar2dex.sh -msdk 26 -o /decompiled/classes.dex /tempFiles/temp72439770942451111143483395049041/outputJar17271700864936955404584632897090_merged.jar
jar2dex /tempFiles/temp72439770942451111143483395049041/outputJar17271700864936955404584632897090_merged.jar -> /decompiled/classes.dex
call com.android.dx.command.Main.main[--min-sdk-version=26, --dex, --no-strict, --output=/decompiled/classes.dex, /tempFiles/temp72439770942451111143483395049041/outputJar17271700864936955404584632897090_merged.jar]
Uncaught translation error: com.android.dx.cf.code.SimException: stack: overflow
1 error; aborting
MacBook-Pro dex2jar-2.0 %

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

4 participants