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