我们可以在 Android Studio 上激活 ASAN 调试 APK 吗?

Can we debug the APK with ASAN active on Android Studio?

我的项目是一个使用原生C++代码和Java的简单游戏,它使用cmake编译C/C++代码。我正在使用地址清理器来检查我的代码。我按照说明here

我的 OS 是 windows 10 64 位。

但是,当我在 Android Studio 上按调试时,我收到的消息是

2020-03-19 13:50:56.946 5152-5152/? E/logwrapper: executing /data/app/com.indie.haiphan.Breakout-ZFFz_f8ETleajrgP6rg9gw==/lib/arm64/wrap.sh failed: No such file or directory
2020-03-19 13:50:56.946 5151-5151/? I/wrap.sh: executing /data/app/com.indie.haiphan.Breakout-ZFFz_f8ETleajrgP6rg9gw==/lib/arm64/wrap.sh failed: No such file or directory
2020-03-19 13:50:56.956 5151-5151/? I/wrap.sh: wrap.sh terminated by exit(255)
2020-03-19 13:50:56.957 873-873/? W/Zygote: Error reading pid from wrapped process, child may have died

我检查了我的 APK(使用 Android Studio 的 Analyze APK)wrap.sh 存在。 所以我的问题是我无法在 APK 中使用 wrap.sh 进行调试?

谢谢

您的 wrap.sh 的第一行末尾可能有 BOM 或额外的回车符 return。在 windows.

可能

要修复它,您可以使用 dos2unix 工具。

看到这个:https://unix.stackexchange.com/a/27067/197738