简体   繁体   中英

dex2jar is not recognized as an internal or external command, operable program or batch file

I am trying to convert one of my old APK's to a jar. 1. I downloaded apk tool in order to get the classes.dex file from my apk. 2. I downloaded dex2 jar and in the command line entered:

C:\Users\myLaptop\Downloads\dex2jar-2.0>dex2jar classes.dex

This lead to this Error:

dex2jar is not recognized as an internal or external command, operable program or batch file.

I am using a windows machine. I saw other questions posted on the issue on this site, when I tried them they didn't work. One solution was to use dex2jar version 0.0.9.15, but I got the same error when attempting to use that version.

I found the solution. If anyone is using dex2jar version 2.0 or higher, use this command in windows:

C:\Users\Zookeeper\Downloads\dex2jar-2.0>d2j-dex2jar classes.dex dex2jar classes.dex ->.\classes-dex2jar.jar

I now have a jar file from my apk

If the above solution doesn't work, try this:

  1. Copy your.apk file into the dex2jar folder.
  2. Open terminal/cmd in that folder.
  3. Enter this command d2j-dex2jar.bat nameOfYourApkFile.apk

This way you will get a.jar file generated from the.apk file in that folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM