Crash when trying to get Image
See original GitHub issueI am trying to run this code
ImagePicker.pickImage(RegisterActivity.this);
But the app crashes with this error
Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
Here is the full log if you need it
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:604)
at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:578)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:416)
at com.mvc.imagepicker.ImagePicker.getPickImageIntent(ImagePicker.java:219)
at com.mvc.imagepicker.ImagePicker.startChooser(ImagePicker.java:189)
at com.mvc.imagepicker.ImagePicker.pickImage(ImagePicker.java:180)
at com.mvc.imagepicker.ImagePicker.pickImage(ImagePicker.java:88)
at com.altorumleren.food4u.modules.signin_signup.signup.RegisterActivity.showImagePicker(RegisterActivity.java:312)
at com.altorumleren.food4u.modules.signin_signup.signup.EnterDetailsFragment.getImage(EnterDetailsFragment.java:123)
at com.altorumleren.food4u.modules.signin_signup.signup.EnterDetailsFragment.onClick(EnterDetailsFragment.java:117)
at android.view.View.performClick(View.java:6256)
at android.view.View$PerformClick.run(View.java:24701)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:172)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
An Ultimate Guide to Fix Photos App Crashing Issue on ...
Is the Photos app on Windows 10/11 stuck or not working properly? Learn how to fix the Photos app crashing issue on Windows...
Read more >Apps crash when saving images - Microsoft Community
Crashes when trying to save images in Google Chrome, Microsoft Edge and with the snipping tool. It also crashes if you open a...
Read more >Fix Photos App Crashing Issue on Windows 10 | Stellar
If an image is not opening in the Photos app, try an alternative photo viewer. If it still doesn?t open, the image file...
Read more >The Android app crashes when trying to upload a picture from ...
Initially I was able to get a screenshot, however the message disappeared before I could select Report, then the app crashed. However, on...
Read more >Android app crashes as soon as i download image
you have to use AsyncTask to download image from server because your main thread can't handle it.And you are trying to download image...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@git1998 Hey you are right, I was never really able to fix this issue and moved to much stabler and easier EasyImage library: https://github.com/jkwiecien/EasyImage
@git1998 @axper try this why waiting for official fix
implementation 'com.github.songpr:ImagePicker:e2b4383'I’ve been using this instead for 9 months already