Reputation:
For some reason my update script doesn't work anymore. It basically downloads an .APK file, compares the version with the installed version and when newer -> updates the old app with the new one.
However, since today the FILE_PROVIDER_PATHS doesn't seem to work anymore.
java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/Hanenberg/latest-version.apk
So my question: what do I need to add to my filepaths.xml to make this work again? I always use the Hanenberg
folder inside the root on emulator/real device.
filepaths.xml:
<?xml version="1.0" encoding="utf-8" ?>
<paths>
<files-path path="/" name="external_storage_root" />
<files-path path="/storage/emulated" name="emulated" />
</paths>
AndroidManifest.xml:
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.myfileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths"/>
</provider>
Upvotes: 2
Views: 313
Reputation: 5134
Try this
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path
name="external_files"
path="." />
</paths>
Upvotes: 1