在调试模式下解码 apk 并尝试在调试模式下构建新的 apk 后,我遇到以下异常。我很困惑,我不知道该怎么办。当我尝试以下操作时,我得到了完全相同的结果。
$java -jar ./apktool.jar d -d meet.apk out
$java -jar ./apktool.jar b -d out meet.apk
或这个
$./apktool d -d meet.apk out
$./apktool b -d out meet.apk
我得到以下输出
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL4160944918573250929.tmp, -I, /root/apktool/framework/1.apk, -S, /home/lab2alex/Documents/out/res, -M, /home/lab2alex/Documents/out/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL4160944918573250929.tmp, -I, /root/apktool/framework/1.apk, -S, /home/lab2alex/Documents/out/res, -M, /home/lab2alex/Documents/out/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:488)
at java.lang.Runtime.exec(Runtime.java:610)
at java.lang.Runtime.exec(Runtime.java:483)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
at java.lang.ProcessImpl.start(ProcessImpl.java:81)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
... 10 more
我应该怎么办