清单中怎么可能有多个相同类型的提供者?由于cordova 相机插件带来了文件提供程序,我们的应用程序无法再构建。在清单中,我们有以下内容:
<provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="android.support.v4.content.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths"/>
</provider>
<provider android:authorities="com.our.app.dev.fileprovider" android:exported="false" android:grantUriPermissions="true" android:name="android.support.v4.content.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_provider_paths"/>
</provider>
Run Code Online (Sandbox Code Playgroud)
第一个条目来自相机插件,第二个来自我们的一个插件。
在构建过程中,出现以下错误:
AndroidManifest.xml:44:5-46:16 Error:
Element provider#android.support.v4.content.FileProvider at AndroidManifest.xml:44:5-46:16 duplicated with element declared at AndroidManifest.xml:41:5-43:16
Run Code Online (Sandbox Code Playgroud)
谢谢!