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

Crash on start #10

Open
SalvatoreAD opened this issue Jun 20, 2018 · 1 comment
Open

Crash on start #10

SalvatoreAD opened this issue Jun 20, 2018 · 1 comment

Comments

@SalvatoreAD
Copy link

when I call imagePicker.choosePicture(true); I have this error:

java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/*********/files/images/outputImage1529499833245.jpg
at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:738)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:417)
at com.myhexaville.smartimagepicker.ImagePicker.getCameraIntent(ImagePicker.java:259)
at com.myhexaville.smartimagepicker.ImagePicker.startImagePickerActivity(ImagePicker.java:288)
at com.myhexaville.smartimagepicker.ImagePicker.choosePicture(ImagePicker.java:85)

@Ibrahimhassan1
Copy link

Ibrahimhassan1 commented Jun 28, 2018

@SalvatoreAD
I had the same issue and adding this line to my file_paths.xml fixes the crash:
<files-path name="img" path="images/" />
This is from my AndroidManifest.xml:

<provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="com.domain.appname.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

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