DexBackedDexFile$NotADexFile error occurs when apk is decompiled

Recently, I need to decompile an apk, but when I execute  the java -jar apktool filename.jar d -f apk filename.apk  command, an error Exception in thread main org.jf.dexlib2.dexbacked.DexBackedDexFileNotADexFile is reported.

Solution:

Just add --only-main-classes after the command

java -jar apktool filename.jar d -f apk filename.apk --only-main-classes

Guess you like

Origin blog.csdn.net/LueLueLue77/article/details/126002521