[英]"apktool: command not found" error
I followed the instructions mentioned here - http://ibotpeaches.github.io/Apktool/install/ for Mac OS to install Apktool 2.X version.我按照这里提到的说明 - http://ibotpeaches.github.io/Apktool/install/ for Mac OS 安装 Apktool 2.X 版本。 I moved the downloaded and renamed files apktool.jar and apktool to /usr/local/bin.
我将下载并重命名的文件 apktool.jar 和 apktool 移动到 /usr/local/bin。
Now when I run apktool from terminal from the same path ie "usr/local/bin", I get "apktool: command not found" error.现在,当我从同一路径(即“usr/local/bin”)从终端运行 apktool 时,出现“apktool: command not found”错误。
Referring to one of the posts here on SO about the same issue ( Terminal can't run apktool ), the suggestion was to run ./apktool instead of apktool and that gives me "-bash: ./apktool: No such file or directory"参考 SO 上关于同一问题的一篇帖子( 终端无法运行 apktool ),建议是运行 ./apktool 而不是 apktool ,这给了我“-bash:./apktool:没有这样的文件或目录”
Am I doing something wrong here?我在这里做错了吗?
The process here is the same as any binary application, with the exception that we have additionally have a jar file.这里的过程与任何二进制应用程序相同,除了我们还有一个 jar 文件。 The
apktool
file is simply a helper script to prevent you having to type java -jar apktool.jar
every time. apktool
文件只是一个帮助脚本,可以防止您每次都键入java -jar apktool.jar
。 With this in mind, you must have the following.考虑到这一点,您必须具备以下条件。
Both files in /usr/local/bin
or a directory that is in $PATH
so you can execute it anywhere regardless of path. /usr/local/bin
两个文件或$PATH
的目录,因此无论路径如何,您都可以在任何地方执行它。
The helper script ( apktool
) must be executable.辅助脚本 (
apktool
) 必须是可执行的。 chmod a+x apktool
If you meet these conditions than running apktool
anywhere will run the helper script, which runs apktool.jar
.如果您满足这些条件,那么在任何地方运行
apktool
都会运行帮助程序脚本,该脚本运行apktool.jar
。 You can test this by cd /usr/local/bin
, java -jar apktool.jar
.您可以通过
cd /usr/local/bin
、 java -jar apktool.jar
。 Does that work?那样有用吗? If so,
apktool.jar
is in the right place.如果是这样,
apktool.jar
就在正确的位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.