23
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.
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"
}
![](https://res.cloudinary.com/practicaldev/image/fetch/s--r7E4tMJp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xz9jsr7pex3p45gv470f.png)
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.
![](https://res.cloudinary.com/practicaldev/image/fetch/s--wBXLxvLB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yvkm6sgjd2srx2qqzuut.png)
A missing debugSoDirectory parameter will also cause the problem. So, make sure you add it as well.
Once the file was generated, I double-clicked processReleaseSymbolUpload. An HTTP exception was reported, as shown in the following figure.
![](https://res.cloudinary.com/practicaldev/image/fetch/s--qcsRKoRc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8mh7f2boa43jd4z6ks75.png)
If you cannot upload the file using a gradle plugin, you can also use a symbol table tool.
![](https://res.cloudinary.com/practicaldev/image/fetch/s--5PNgrVHl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ctcl5xrfnm5x8auza2hv.png)
Or, you can manually upload the file in AppGallery Connect.
![](https://res.cloudinary.com/practicaldev/image/fetch/s--jQr8qQqR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obfvzah62b80sdt039qc.png)
For more info see the official documentation
23