doulu8446 2018-11-19 07:48
浏览 76
已采纳

如何在Crashlytics中获取golang的堆栈跟踪

Our's app is a Android app, which has a JNI writed by golang. And we use the Fabric Crashlytics to track carshes.

But, we can not get the Stack-trace information in the Crashlytics, after a crash happened in the JNI. In the Java, We can get it.

In the Object-C for iOS app, we can upload the dSYM file to map the functions. But where can I do it with Golang?

Does the Fabric support it?

Now, in the Crashlytics, we can see below only:

Crashed: Thread
0  libc.so                        0xf6f4c778 (Missing)
1  libc.so                        0xf6f26791 (Missing)
2  libc.so                        0xf6f23933 (Missing)
3  (Missing)                      0x15c791e6 (Missing)
4  libgojni.so                    0xdddd910e (Missing)
5  libc.so                        0xf6f214ee (Missing)
6  (Missing)                      0x15c791e6 (Missing)
7  libgojni.so                    0xde00a8de (Missing)
8  libgojni.so                    0xde00a93e (Missing)
9  libgojni.so                    0xdddd8ed6 (Missing)
  • 写回答

1条回答 默认 最新

  • douzong7283 2018-11-23 14:19
    关注

    We have been resolved this issue.

    The background:

    We build a Android app, it has a JNI writed by go, which is build by gomobile. We use the Fabric Crashlytics to monitor the crash information. But in the Crashlytics, we could not see the full stack trace information which occurred in the JNI.

    The Solution is:

    At the first, please check your NDK version, it must be r17c or more.

    Add a param --work in the gomobile command, like gomobile bind --work YOUR-SOURCE-CODE-PATH WORK=TEMP-PATH.

    After build successful, move the all of files in the jniLibs to YOUR-PROJECT-PATH/app/obj.

    At the last, do the steps list in Fabric docs.

    Hope our experiences can save your time :-)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题