android / android/app-bundle-samples
Dynamic feature UnsatisfiedLinkError
- Dominant language
- C++
- Stars
- 735
- Forks
- 348
- PR merge metrics
- No merged PRs in 30d
Description
I'm using the speech recognition of azure, because the aar provided by azure is relatively large, so I use this feature as a dynamic feature module, like this
```Implementation com.microsoft cognitiveservices.speech: client-sdk: 1.27.0 '```
` com.microsoft cognitiveservices.speech: client-sdk` contains the so file, and will automatically System.loadLibrary (") inside aar.
After my dynamic feature module is installed, the speech recognition function is called in the current activity, and the base module uses reflection to call the dynamic module code, but UnsatisfiedLinkError
Oddly enough, if I kill the app and restart it, it works fine
How can I solve this problem
Seems similar to this #30
Contributor guide
Research direction
Start at the current activity's speech-recognition call and the base module's reflection entry point, then inspect how the installed dynamic module invokes Azure's AAR and its automatic System.loadLibrary. Done means speech recognition works immediately after dynamic feature installation without requiring an app restart; compare that path with the successful restart path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, azure
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100