Android 更新 android.support.v4.content 到 androidx.core.content.FileProvider 不会保留
我正在尝试将 FileProvider 类从 android.support.v4.content.FileProvider
更新为 androidx.core.content.FileProvider
这使我能够成功构建。
当我运行ionic capsync
时,它会恢复到android.support.v4.content.FileProvider
...
我有cordova-plugin-androidx-adapter
代码>已安装。
如何使其保持为 androidx.core.content.FileProvider
或使适配器正常工作?
在我的 AndroidManifest.xml
中:
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
</provider>
I am trying to update the FileProvider class from android.support.v4.content.FileProvider
to androidx.core.content.FileProvider
which allows me to build successfully.
When I run ionic cap sync
it reverts back to android.support.v4.content.FileProvider
...
I have cordova-plugin-androidx-adapter
installed.
How can I make it stay as androidx.core.content.FileProvider
or make the adapter work?
In my AndroidManifest.xml
:
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
</provider>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
@MishaMashina 的上述评论是明确的答案。我只是在这里回答,因为我能够让我的项目在不使用 cordova-plugin-androidx-adapter 的情况下编译运行 jetify。
The above comment from @MishaMashina is the definitive answer. I am only answering here as I was able to get my project to compile running jetify without using the cordova-plugin-androidx-adapter.