FileProvider Failed to find configured root that contains のエラーが出る場合
FileProviderを使って以下のエラーが生じる
Failed to find configured root that contains
参考
自分の作成したxmlファイルは以下の通り。
<?xml version="1.0" encoding="utf-8"?> <paths xmlns:android="http://schemas.android.com/apk/res/android"> <external-path name="name" path="." /> </paths>
これだとrootが見つけられないと表示される。
root-pathタグに変更したらエラーを解消できた。
<?xml version="1.0" encoding="utf-8"?> <paths xmlns:android="http://schemas.android.com/apk/res/android"> <root-path name="name" path="." /> </paths>