vaenow / cordova-plugin-app-update

App updater for Cordova/PhoneGap
MIT License
299 stars 146 forks source link

Error: No resource found that matches the given name (at 'resource' with value '@xml/provider_paths'). #43

Closed vovikdrg closed 6 years ago

vovikdrg commented 6 years ago

I am getting error

platforms\android\build\intermediates\manifests\full\armv7\debug\AndroidManifest.xml:55: error: Error: No resource found that matches the given name (at 'resource' with value '@xml/provider_paths').

<provider android:name="com.vaenow.appupdate.android.GenericFileProvider" android:authorities="com.vaenow.appupdate.android.provider" android:exported="false" android:grantUriPermissions="true" > <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />

cli packages: (C:\Projects\flymark-offline\flymark-judging\node_modules)

@ionic/cli-utils  : 1.12.0
ionic (Ionic CLI) : 3.12.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 3.0.0
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.7.1

System:

Android SDK Tools : 26.1.1
Node              : v6.11.2
npm               : 5.2.0
OS                : Windows 10

Misc:

backend : legacy
vovikdrg commented 6 years ago

I solved my problem by

Defining xml file

resources/xml/provider_paths.xml

<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path name="external_files" path="."/>
    <files-path name="files" path="."/>
</paths>

Then inside config.xml > platform android insert <resource-file src="resources/xml/provider_paths.xml" target="res/xml/provider_paths.xml" />

After some reading its possible to add this to be part of plugin https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#resource-file

I can try to do pull request if you want

vovikdrg commented 6 years ago

Duplicate of #40

vovikdrg commented 6 years ago

It seems that your pull request did not fixes since i am on "cordova-plugin-app-update": "^1.3.11",

vaenow commented 6 years ago

@vovikdrg it's very appreciate for your pull request

GurdeepAgam commented 5 years ago

solution provided by vovikdrg works for me.