Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

Camera Intent Crash #49

Closed
amjadislam opened this issue Dec 20, 2017 · 5 comments
Closed

Camera Intent Crash #49

amjadislam opened this issue Dec 20, 2017 · 5 comments

Comments

@amjadislam
Copy link

Android applicaiton crash on kitkat. please fix it.

@alhazmy13
Copy link
Owner

Hi @amjadislam ,
Can you please paste your stack trace?

Thanks

@alhazmy13 alhazmy13 self-assigned this Dec 22, 2017
@Mutalistik
Copy link

Mutalistik commented Jan 3, 2018

Hello Im getting the same problem with camera and video in nexus 5x android 8.1.0, and in samsung s6 android 7.0

My code is

new ImagePicker.Builder(activity) .mode(ImagePicker.Mode.CAMERA) .compressLevel(ImagePicker.ComperesLevel.MEDIUM) .directory(ImagePicker.Directory.DEFAULT) .allowMultipleImages(false) .enableDebuggingMode(enableDebug) .build();

and the error:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/net.alhazmy13.mediapicker.Image.ImageActivity}: java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/mediapicker/images/514b755a-5e40-42a1-ad07-a6e75117100c.png
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/mediapicker/images/514b755a-5e40-42a1-ad07-a6e75117100c.png
at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:712)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:401)
at net.alhazmy13.mediapicker.Image.ImageActivity.startActivityFromCamera(ImageActivity.java:156)
at net.alhazmy13.mediapicker.Image.ImageActivity.pickImage(ImageActivity.java:81)
at net.alhazmy13.mediapicker.Image.ImageActivity.pickImageWrapper(ImageActivity.java:298)
at net.alhazmy13.mediapicker.Image.ImageActivity.onCreate(ImageActivity.java:69)
at android.app.Activity.performCreate(Activity.java:6999)
at android.app.Activity.performCreate(Activity.java:6990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
at android.app.ActivityThread.-wrap11(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6494) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
01-03 21:05:44.265 15429-15429/com.myapp E/UncaughtException: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/net.alhazmy13.mediapicker.Image.ImageActivity}: java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/mediapicker/images/514b755a-5e40-42a1-ad07-a6e75117100c.png
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/mediapicker/images/514b755a-5e40-42a1-ad07-a6e75117100c.png
at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:712)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:401)
at net.alhazmy13.mediapicker.Image.ImageActivity.startActivityFromCamera(ImageActivity.java:156)
at net.alhazmy13.mediapicker.Image.ImageActivity.pickImage(ImageActivity.java:81)
at net.alhazmy13.mediapicker.Image.ImageActivity.pickImageWrapper(ImageActivity.java:298)
at net.alhazmy13.mediapicker.Image.ImageActivity.onCreate(ImageActivity.java:69)
at android.app.Activity.performCreate(Activity.java:6999)
at android.app.Activity.performCreate(Activity.java:6990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)

Thanks

@nadhirfr
Copy link

I also get this error, how to fix this? Thanks

@Doha26
Copy link

Doha26 commented Jan 18, 2018

just add <activity android:name="net.alhazmy13.mediapicker.Image.ImageActivity"></activity>
on your manifest and it will fix the issue.

alhazmy13 added a commit that referenced this issue Apr 17, 2018
@alhazmy13
Copy link
Owner

Hi @PavelFoujeu and @nadhirfr
Can you please confirm if it fixed wit last beta release 2.4.1-beta or not?

Thanks

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

No branches or pull requests

5 participants