【问题标题】:Can we debug the APK with ASAN active on Android Studio?我们可以在 Android Studio 上激活 ASAN 来调试 APK 吗?
【发布时间】:2020-03-19 06:56:50
【问题描述】:

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

我的操作系统是 windows 10 64bit。

但是,当我在 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 的分析 APK)存在 wrap.sh。 所以我的问题是我无法在 APK 中使用 wrap.sh 进行调试?

谢谢

【问题讨论】:

    标签: android android-studio android-ndk address-sanitizer


    【解决方案1】:

    wrap.sh 的第一行末尾可能有 BOM 或额外的回车符。哪个在windows中是可能的。

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

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

    【讨论】:

    • 感谢您的建议。我跟着它,错误missing wrap.sh消失了,但是我仍然无法调试我的应用程序。
    • @seal2002 这是一个单独的问题,所以我建议提出一个新问题 :-)
    • 是的,最好分开。我会做的
    猜你喜欢
    • 1970-01-01
    • 2020-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-19
    • 2014-11-11
    • 1970-01-01
    相关资源
    最近更新 更多