Skip to content

Commit c2b929d

Browse files
authored
docs(android): Extend NDK troubleshooting docs for debug images (#14416)
## DESCRIBE YOUR PR Extends NDK troubleshooting docs for debug images and how to invalidate the cache. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 400fc56 commit c2b929d

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

docs/platforms/android/configuration/using-ndk.mdx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,26 @@ configurations.configureEach {
115115
Unsymbolicated stack traces may be caused by module-caching on the SDK side. Be sure to clear any existing module cache if your modules are loaded dynamically:
116116

117117
```cpp
118-
// load a new module
118+
// 1. Load a new module
119+
load_my_module();
120+
121+
// 2. Clear the module cache
119122
sentry_clear_modulecache();
120123
```
124+
125+
```kotlin
126+
// 1. Manually initialize the SDK,
127+
// in order to keep a reference to the SDK options
128+
var optionsRef: SentryAndroidOptions? = null
129+
SentryAndroid.init(this) { options ->
130+
options.dsn = "___PUBLIC_DSN___"
131+
// ...
132+
optionsRef = options
133+
}
134+
135+
// 2. Load a new module
136+
System.loadLibrary("<library>")
137+
138+
// 3. Clear the cache
139+
optionsRef?.debugImagesLoader?.clearDebugImages()
140+
```

0 commit comments

Comments
 (0)