Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed when plugin #205

Closed
tomavic opened this issue May 8, 2017 · 9 comments
Closed

Build failed when plugin #205

tomavic opened this issue May 8, 2017 · 9 comments
Labels
help wanted Collaboration wanted on this issue

Comments

@tomavic
Copy link

tomavic commented May 8, 2017

I have a phonegap application that using diagnostic-plugin , previously it was working fine and I can build android and build ios.

But since 2 weeks (i don't know what exactly happened) I tried to build and I got this error

:processDebugResources
C:\Users\IM\Desktop\mink-foodiee\platforms\android\build\intermediates\res\merged\debug\values-v24\values-v24.xml:3 : AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

C:\Users\IM\Desktop\mink-foodiee\platforms\android\build\intermediates\res\merged\debug\values-v24\values-v24.xml:4 : AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\IM\AppData\Local\Android\sdk\build-tools\25.0.3\aapt.exe'' finished with non-zero exit value 1

I got mad and I searched the internet I found many solutions not related to this problem.
later, I tried to remove platforms and plugins folders from my project and install every plugin again one-by-one.

The application is build successful if and only if I didn't include diagonstic-plugin

If there is any previous version I should target at the time of installing, please mention that

============================================

`<plugin name="cordova.plugins.diagnostic" source="npm" />`
`<plugin name="cordova-plugin-request-location-accuracy" source="npm" />`
`<plugin name="cordova-plugin-contacts" source="npm" spec="~2.0.1" />`
`<plugin name="cordova-plugin-device" source="npm" spec="~1.1.1" />`
`<plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0" />`
`<plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2" />`
`<plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.1" />`
`<plugin name="cordova-plugin-file" source="npm" spec="~4.1.1" />`
`<plugin name="cordova-plugin-file-transfer" source="npm" spec="~1.5.0" />`
`<plugin name="cordova-plugin-geolocation" source="npm" spec="~2.1.0" />`
`<plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3" />`
`<plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0" />`
`<plugin name="cordova-plugin-media" source="npm" spec="~2.2.0" />`
`<plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" />`
`<plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.3" />`

ddddddddddd

@dpa99c
Copy link
Owner

dpa99c commented May 8, 2017

This error is related to the Android Support Library.

There are several possible causes, including version collision with another plugin and version mismatch between compile SDK and library version.

See #203, #168 and #161 for details.

@tomavic
Copy link
Author

tomavic commented May 8, 2017

#161 I found it useful and I'll try to downgrade version to @3.3.2
But currently I am not targeting any version
<plugin name="cordova.plugins.diagnostic" source="npm" />

I'll try to build with
<plugin name="cordova.plugins.diagnostic" source="npm" spec="~3.3.2"/>
and check if it works or not

@dpa99c
Copy link
Owner

dpa99c commented May 8, 2017

The cause of your issue looks to be the same as #203 i.e. a Gradle version collision, but instead of the Image Picker plugin causing the collision, it looks like it's phonegap-plugin-push, because it fixes the version of the support library to v13:23+

@tomavic
Copy link
Author

tomavic commented May 8, 2017

But I am using Command line to build the app not Android studio. Till now I don't know what to do

UPDATE
Currently I am using push plugin with spec="1.9.2" without diagnostic,
I'll try to build with
<plugin name="cordova.plugins.diagnostic" source="npm" spec="~3.3.2"/>
and check if it works or not

@dpa99c
Copy link
Owner

dpa99c commented May 8, 2017

But I am using Command line to build the app not Android studio

That makes no difference - the Cordova/Phonegap CLI still uses Gradle to satisfy Android build dependencies.

As I've said, your problem is a Gradle version collision of the support library version specified by this plugin vs that specified by phonegap-plugin-push.

v3.3.2 specifies the same Gradle version so will not help you.

To resolve this issue, you need to manually resolve the Gradle dependency clash. You will need to fork (or locally clone and modify) either this plugin or phonegap-plugin-push to do this. Either way, you'll need to edit the plugin.xml to specify the same support library version in both plugins.

@dpa99c dpa99c added the help wanted Collaboration wanted on this issue label May 8, 2017
@tomavic
Copy link
Author

tomavic commented May 8, 2017

Can you please tell me Exactly what is the required change to do. If I am going to change the plugin.xml of diagnostic plugin ?

@tomavic
Copy link
Author

tomavic commented May 8, 2017

I had changed plugin.xml of this plugin. I had changed the this line
<framework src="com.android.support:support-v4:+" />

to

<framework src="com.android.support:support-v13:23+"/>

and I got

BUILD SUCCESSFUL

Total time: 47.879 secs

Command finished with error code 0: cmd /s /c "C:\Users\IM\Desktop\mink-foodiee\platforms\android\gradlew.bat cdvBuildDebug -b C:\Users\IM\Desktop\mink-foodiee\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true"

@dpa99c
Copy link
Owner

dpa99c commented May 8, 2017

Problem solved 👍

@dpa99c dpa99c closed this as completed May 8, 2017
@tomavic
Copy link
Author

tomavic commented May 8, 2017

It's working now , But what about that error!!

BTW the app working fine, I am getting device token and I a can use location settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Collaboration wanted on this issue
Projects
None yet
Development

No branches or pull requests

2 participants