DEV Community

Zachary Powell
Zachary Powell

Posted on

1 1

What can I do if I cannot upload the native symbol file when using the Crash service?

I have been using the Crash service provided by HUAWEI AppGallery Connect recently. However, I encountered two problems when using it. One is that the native symbol file failed to be generated, and two, I failed to upload the file. In this post, I summarized my experience in the hope that it will help others who encounter the same problem.

Generating a Native Symbol File

I added the following code by referring to the official materials but couldn't find the agcp task in the Tasks directory under
Gradle.

agcp{
    debug = true
    appVersion = 1.0
    symbolUpload = true   
    debugSoDirectory = "D:\\Onebox\\AndroidProject\\crashdemo\\app\\build\\intermediates\\cmake"
    ndkDirectory = "D:\\AndroidSDK\\sdk\\ndk\\21.3.6528147"
}
Enter fullscreen mode Exit fullscreen mode

image

I checked the documentation and found that I hadn't added the JSON file, so I added the JSON file to the app directory and synchronized the project. This resolved the problem.

image

A missing debugSoDirectory parameter will also cause the problem. So, make sure you add it as well.

Uploading a Native Symbol File

Once the file was generated, I double-clicked processReleaseSymbolUpload. An HTTP exception was reported, as shown in the following figure.

image
I often connect my PC to our company's proxy. Once I disconnected from the proxy, the file was uploaded successfully.
image

If you cannot upload the file using a gradle plugin, you can also use a symbol table tool.

image

Or, you can manually upload the file in AppGallery Connect.

image

For more info see the official documentation

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more