我试着分析苹果商店给出的崩溃iOS应用程序崩溃日志,使用符号化的~~~.crash和dSYM文件。然而,当我试图制作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;
}发布于 2015-10-27 23:12:33
我用bash(在使用zsh之前)尝试了相同的操作,然后进行得很好。这个问题似乎是由于.zshrc的设置造成的。
发布于 2015-10-27 02:10:56
1)
在命令行中输入以下内容:
xcode-select --print-path
如果它显示/Application/Xcode.app/Content/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“里。
发布于 2022-03-24 02:51:46
将DEVELOPER_DIR设置为“工作的$ export DEVELOPER_DIR=”””
https://stackoverflow.com/questions/33358799
复制相似问题