weixin_39933508
weixin_39933508
2020-12-26 09:36

react-native-app-upgrade和react-native-image-crop-picker都用到了fileProvider,导致冲突报错

G:\project\sucaiapp_3\android\app\src\main\AndroidManifest.xml:60:13-70 Error: Attribute provider#android.support.v4.content.FileProvider value=(c om.dadichuangke.updateFileProvider) from AndroidManifest.xml:60:13-70 is also present at [sucaiapp:react-native-image-crop-picker:unspecified] Andr oidManifest.xml:15:13-60 value=(com.dadichuangke.provider). Suggestion: add 'tools:replace="android:authorities"' to eleme nt at AndroidManifest.xml:58:9-66:20 to override. G:\project\sucaiapp_3\android\app\src\main\AndroidManifest.xml:65:17-61 Error: Attribute meta-data#android.support.FILE_PROVIDER_PATHS value=(/up date_file_provider) from AndroidManifest.xml:65:17-61 is also present at [sucaiapp:react-native-image-crop-picker:unspecified] Andr oidManifest.xml:20:17-55 value=(/provider_paths). Suggestion: add 'tools:replace="android:resource"' to element a t AndroidManifest.xml:63:13-65:64 to override.

Building 97% > :app:processDebugManifest See http://g.co/androidstudio/manifest-merger for more information about the man ifest merger.

:app:processDebugManifest FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processDebugManifest'.

    Manifest merger failed with multiple errors, see logs

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED 请问这该怎么解决,才不影响两个插件的正常使用?

该提问来源于开源项目:songxiaoliang/react-native-app-upgrade

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39933508 weixin_39933508 3月前

    能说一下具体要修改那吗?

    点赞 1 评论 复制链接分享
  • weixin_39587822 weixin_39587822 3月前

    需要修改下image-crop-picker的源码,使用同一个fileprovider就可以了。

    点赞 评论 复制链接分享
  • weixin_39933508 weixin_39933508 3月前

    看到修改方法了,谢谢群主大大

    点赞 评论 复制链接分享
  • weixin_39956110 weixin_39956110 3月前

    你好!我也遇到这个问题了,请问你是如何解决的呢,谢谢!

    点赞 评论 复制链接分享
  • weixin_39587822 weixin_39587822 3月前

    具体看下READEME文档。

    点赞 评论 复制链接分享