android / android/app-bundle-samples

ContentProvider in dynamic module

Open
#128 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
735
Forks
348
PR merge metrics
No merged PRs in 30d

Description

I have declared ContentProvider in my dynamic module's manifest 。 this would result in ClassNotFoundException.(bad english)
















trace:
java.lang.RuntimeException: Unable to get provider com.exp.initializer.MobileInitializeProvider: java.lang.ClassNotFoundException: Didn't find class "com.exp.initializer.MobileInitializeProvider" on path: DexPathList[[zip file "/data/app/com.block.puzzle.game.wooden-s38mQmfCLB4I1rmGAkXfDg==/base.apk", zip file "/data/app/com.block.puzzle.game.wooden-s38mQmfCLB4I1rmGAkXfDg==/split_config.arm64_v8a.apk"],nativeLibraryDirectories=[/data/app/com.block.puzzle.game.wooden-s38mQmfCLB4I1rmGAkXfDg==/lib/arm64, /data/app/com.block.puzzle.game.wooden-s38mQmfCLB4I1rmGAkXfDg==/base.apk!/lib/arm64-v8a, /data/app/com.block.puzzle.game.wooden-s38mQmfCLB4I1rmGAkXfDg==/split_config.arm64_v8a.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
at android.app.ActivityThread.installProvider(ActivityThread.java:7191)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6669)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6586)
at android.app.ActivityThread.access$1500(ActivityThread.java:233)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1914)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7561)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the dynamic module manifest and the ContentProvider declaration for com.exp.initializer.MobileInitializeProvider, then reproduce the install-time delivery scenario from the reported trace. Check whether the provider class is present and loadable in the base APK or delivered module; done means the application starts without this ClassNotFoundException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.