Closed hectoritr closed 2 years ago
I found this error happen in android 9 and after because is a file provider conflict. to solve that when I change the authorities at the manifest
` <provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.stonefacesoft.ottaaproject.fileprovider"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities"
>
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
`
by that
` <provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities"
>
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
`
after that, I edit the file "file_paths". at this file, I changed the following lines
<external-path name="my_images" path="Android/data/com.stonefacesoft.ottaa/files/Pictures" />
<external-path name="my_images_debug" path="Android/data/com.stonefacesoft.ottaa.debug/files/Pictures" />
by this
<files-path
name="my_images"
path="images/" />
<files-path
name="my_docs"
path="docs/" />
<external-files-path
name="external_files_dir"
path="/" />
<cache-path
name="cache_dir"
path="/" />
<external-cache-path
name="external_cache_dir"
path="/" />
<external-media-path
name="external_media_dir"
path="/" />
<external-media-path
name="external_media_dir"
path="/" />
To Reproduce Steps to reproduce the behavior:
Screenshots
Smartphone (please complete the following information):
Additional context