Peltier Cooler
Peltier Cooler

Reputation: 169

Decompiler issue "Could not find or load main class classes.dex"

Attempting to recover an app I wrote not long ago (do not store in DropBox), I unzipped my .apk and tried to use

d2j-dex2jar classes.dex 

to get my source, but got this message instead:

Error: Could not find or load main class classes.dex

Like all rookies, my main activity (only one, actually) was named MainActivity.java, not Main.java. Is this the source of this error and if so, how can I fix it? If not, what else can I try?

NOTE: this is being done in the DOS cmd window.

EDIT: wow, nobody has ever seen this?

EDIT: I did not use ProGuard (I checked).

Upvotes: 3

Views: 8339

Answers (3)

Maxim Akristiniy
Maxim Akristiniy

Reputation: 2126

Got same issue in windows, solved - path must not contain special symbols, like '!', otherwise utility can't find libraries

Upvotes: 1

Nevin Chen
Nevin Chen

Reputation: 1815

I'm on mac 10.13.1 I just had this issue. I solve it by chmod 700 lib cause jar libs in it were not accessible.

Upvotes: 0

Daniel M.
Daniel M.

Reputation: 486

Ok , so from my work with dex2jar I'd recomment running it directly on the apk file not on the classes.dex . So in your terminal ( using Windows in the exmple )

C:\dex2jar.bat Lost_apk.apk

It will spit out a jar file which you can look into with jd-gui.

Upvotes: 6

Related Questions