4

我尝试使用 symbolicatecrash ~~~.crash 和 dSYM 文件分析 Apple 商店给出的崩溃 iOS 应用程序崩溃日志。但是,当我尝试制作 crash.log 时,出现以下错误。你能告诉我如何解决这个问题吗?

$ ./symbolicatecrash ~~~.crash ~~~.dSYM > crash.log

sh: ”/Applications/Xcode.app/Contents/Developer”/usr/bin/xcrun: No such file or directory
Error: can't find tool named 'otool' in the macosx SDK or any fallback SDKs at ./symbolicatecrash line 115.

以下是符号崩溃文件

#symbolicatecrash
sub getToolPath {
    my ($toolName, $sdkGuess) = @_;

    if (!defined($sdkGuess)) {
        $sdkGuess = "macosx";
    }

    my $toolPath = `'$DEVELOPER_DIR/usr/bin/xcrun' -sdk $sdkGuess -find $toolName`;
    if (!defined($toolPath) || $? != 0) {
        if ($sdkGuess eq "macosx") {
            die "Error: can't find tool named '$toolName' in the $sdkGuess SDK or any fallback SDKs"; <------ This line is line115
        } elsif ($sdkGuess eq "iphoneos") {
            print STDERR "## Warning: can't find tool named '$toolName' in iOS SDK, falling back to searching the Mac OS X SDK\n";
            return getToolPath($toolName, "macosx");
        } else {
            print STDERR "## Warning: can't find tool named '$toolName' in the $sdkGuess SDK, falling back to searching the iOS SDK\n";
            return getToolPath($toolName, "iphoneos");
        }
    }

    chomp $toolPath;
    print STDERR "$toolName path is '$toolPath'\n" if $opt{v};

    return $toolPath;
}
4

2 回答 2

1

1)

在命令行中输入:

xcode-select --print-path

如果显示 /Application/Xcode.app/Contents/Developer 的路径,则转到步骤 2。如果没有,请使用“ sudo xcode-select -s /path/to/your/Xcode/Contents/Developer”文件夹更改路径。

2)

尝试安装 Xcode 命令行工具,您可以在http://developer.apple.com/xcode站点的“其他工具”链接下获得这些工具。

3)

确保您的 .tcshrc / .bashrc " $PATH" 环境变量是正确的。在我的本地机器中,“ xcrun”居住在“ /usr/bin”中,也otool居住在“ /usr/bin”中。

于 2015-10-27T02:10:56.553 回答
-1

我已经尝试过 bash 的相同操作(在我使用 zsh 之前),然后进展顺利。似乎问题是由.zshrc 的设置引起的。

于 2015-10-27T23:12:33.967 回答