vaenow / cordova-plugin-app-update

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

Error to build android apk #44

Closed arthurflor23 closed 6 years ago

arthurflor23 commented 6 years ago

After add the plugin, I get this error:

        AAPT: No resource found that matches the given name (at 'resource' with value '@xml/provider_paths')

=l

coopers98 commented 6 years ago

Same as this one: https://github.com/vaenow/cordova-plugin-app-update/issues/40

arthurflor23 commented 6 years ago

I found a solution complete

1 - Solution from @vovikdrg 1.1 - Create the file

your_project/resources/xml/provider_paths.xml

With

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

1.2 - Then inside config.xml, in the section platform android, insert:

<resource-file src="resources/xml/provider_paths.xml" target="res/xml/provider_paths.xml" />

2 - Now it gives an error with the "com.android.support:support-v4". So I found this solution

2.1 - Find the file:

your_project/platforms/android/build.gradle

And inside it locate the section dependencies { ... }, line 247 (in my case), add the line:

compile 'com.android.support:support-v4:+'

Save and run the build.

Worked for me! I hope this solution helps other people too!