问题
I am in the middle of migrating a project to AndroidX and I am blocked with an issue.
<provider
android:name="androidx.core.content.FileProvider" <--- Changed to X lib
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS" <---- ISSUE
android:resource="@xml/file_paths" />
</provider>
I searched all the Internet and couldn't find a solution for this: what should I add instead of android.support.FILE_PROVIDER_PATHS for AndroidX?
回答1:
still the same. android.support.FILE_PROVIDER_PATHS
is in the example here
回答2:
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
For androidx, the metadata should be like this. Checkout this from android studio : https://developer.android.com/reference/androidx/core/content/FileProvider.html
来源:https://stackoverflow.com/questions/53390060/migrating-to-androidx-android-support-file-provider-paths-location