Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matisse error app crashes- android.content.ActivityNotFoundException: Unable to find explicit activity class #872

Open
KingsAGC opened this issue Jan 27, 2022 · 1 comment

Comments

@KingsAGC
Copy link

On Clicking pick images button in MainActivity my app crashes and errors Matisse library using

android.content.ActivityNotFoundException: Unable to find explicit activity class {agc.pdf.maker/com.zhihu.matisse.ui.MatisseActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2078)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1727)
at android.app.Activity.startActivityForResult(Activity.java:5377)
at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:584)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:676)
at android.app.Activity.startActivityForResult(Activity.java:5335)
at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:570)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:663)
at com.zhihu.matisse.SelectionCreator.forResult(SelectionCreator.java:363)
at agc.pdf.maker.MainActivity$3.onClick(MainActivity.java:266)
at android.view.View.performClick(View.java:8160)
at android.view.View.performClickInternal(View.java:8137)
at android.view.View.access$3700(View.java:888)
at android.view.View$PerformClick.run(View.java:30236)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8633)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

@kamaravichow
Copy link

Add below to your manifest file

<activity android:name="com.zhihu.matisse.ui.MatisseActivity" />
<activity android:name="com.zhihu.matisse.internal.ui.AlbumPreviewActivity" />
<activity android:name="com.zhihu.matisse.internal.ui.SelectedPreviewActivity" />

Should fix the above error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants