LuckSiege / LuckSiege/PictureSelector

Didn't find class "com.luck.picture.lib.basic.PictureFileProvider"

Open
#2,947 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
13.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

## Current use version?
#### 当前使用的版本是多少?

```
v3.11.2版本

```

## Will this problem occur in demo?
#### Demo能否复现这问题?

```
我本地无法复现,但是线上崩溃激增

```

## Describe the problem or provide an error log?
#### 描述问题或提供错误log?

```Caused by java.lang.ClassNotFoundException
Didn't find class "com.luck.picture.lib.basic.PictureFileProvider" on path: DexPathList[[zip file "/data/app/com.imile.pdaopt-I9DDSDIYORJDi4of14-CmQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.imile.pdaopt-I9DDSDIYORJDi4of14-CmQ==/lib/arm64, /data/app/com.imile.pdaopt-I9DDSDIYORJDi4of14-CmQ==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:196)
java.lang.ClassLoader.loadClass (ClassLoader.java:379)
java.lang.ClassLoader.loadClass (ClassLoader.java:312)
android.app.AppComponentFactory.instantiateProvider (AppComponentFactory.java:147)
androidx.core.app.CoreComponentFactory.instantiateProvider (CoreComponentFactory.java:1)
android.app.ActivityThread.installProvider (ActivityThread.java:7000)
android.app.ActivityThread.installContentProviders (ActivityThread.java:6556)
android.app.ActivityThread.handleBindApplication (ActivityThread.java:6473)
android.app.ActivityThread.access$1400 (ActivityThread.java:226)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1884)
android.os.Handler.dispatchMessage (Handler.java:107)
android.os.Looper.loop (Looper.java:214)
android.app.ActivityThread.main (ActivityThread.java:7386)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:980)

```
我看到之前的 issue 里有类似的问题,是因为分包导致的么,系统是 android10,当前项目 minSdk 是 21,默认是开启了 MultiDex 的。想知道关闭的 issue 是怎么处理了这个问题

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Android provider registration for com.luck.picture.lib.basic.PictureFileProvider and the app's MultiDex configuration, using the reported ClassNotFoundException on Android 10 as the reproduction target. Compare the v3.11.2 setup with the earlier related issue mentioned in the report; done means the provider loads successfully in the affected release configuration without the crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
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.