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

Diagnostic + Ionic 3 compile error #211

Closed
airstep opened this issue Jun 5, 2017 · 7 comments
Closed

Diagnostic + Ionic 3 compile error #211

airstep opened this issue Jun 5, 2017 · 7 comments

Comments

@airstep
Copy link

airstep commented Jun 5, 2017

With latest sdk-tools, etc...

Error: /home/taras/work/weblancer/zamaruev/new/ouicam/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/taras/work/weblancer/zamaruev/new/ouicam/platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: AAPT: Error retr
ieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/home/taras/work/weblancer/zamaruev/new/ouicam/platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: AAPT: Error retr
ieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

/home/taras/work/weblancer/zamaruev/new/ouicam/platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: error: Error ret
rieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/home/taras/work/weblancer/zamaruev/new/ouicam/platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: error: Error ret
rieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

@dpa99c
Copy link
Owner

dpa99c commented Jun 5, 2017

This error can also be caused by a Gradle dependency collision where another plugin pins a specific version of the Android Support or App Compat libraries on which this plugin depends - see #203 and #205. Check the plugin.xml of the other plugins that the problematic project includes to determine if this is the case.

You can also try building the example project which validates the plugin in isolation.

@airstep
Copy link
Author

airstep commented Jun 5, 2017

Nothing helps when I change plugin.xml of diagnostic plugin....

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

Also I've tried to change camera plugin.xml...
<framework src="com.android.support:support-v4:+" />
Nothing help's

My current > cordova plugin ls
✔ Running command - done!
com.synconset.imagepicker 2.1.7 "ImagePicker"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.7 "Console"
cordova-plugin-datepicker 0.9.3 "DatePicker"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-facebook4 1.7.4 "Facebook Connect"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-googleplus 5.1.1 "Google SignIn"
cordova-plugin-mauron85-background-geolocation 2.2.5 "CDVBackgroundGeolocation"
cordova-plugin-media-capture 1.4.3 "Capture"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-video-editor 1.1.2 "VideoEditor"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-sms-plugin 0.1.11 "Cordova SMS Plugin"
cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin"
cordova.plugins.diagnostic 3.6.4 "Diagnostic"
ionic-plugin-keyboard 2.2.1 "Keyboard"
mx.ferreyra.callnumber 0.0.2 "Cordova Call Number Plugin"
twitter-connect-plugin 0.6.0 "Twitter Connect"

It only success if I remove diagnostic plugin. But I need to request permission ))

@dpa99c
Copy link
Owner

dpa99c commented Jun 5, 2017

The cause is almost certainly a Gradle collision.

If you are using the Telerik version of com.synconset.imagepicker, this pins the App Compat library to v23+ which will cause the issue. Have you checked this plugin?

There may also be other plugins in your list that pin versions of the App Compat or Android Support libraries. You need to go through and align them, or you will not be able to solve this error.

However, this is a not a bug with specifically with this plugin, which purposefully does not pin the library to specific versions: if other plugins also obeyed this rule, then these collisions would not occur.

@airstep
Copy link
Author

airstep commented Jun 5, 2017

Yes, I've checked all plugins by search v[Index] in all plugin.xml
And found such plugins: Camera, ImagePicker and BackgroundGeolocation

But what I need to insert to all of them to make it work?
Just tried to remove specific v23, but it's not working

@dpa99c
Copy link
Owner

dpa99c commented Jun 5, 2017

Removing v23+ will not work if you have ImagePicker from Telerik in your project because that ImagePicker plugin is hard-coded to be dependent on v23 of App Compat - any later version breaks it.

Setting the plugin.xml of ImagePicker from <framework src="com.android.support:appcompat-v7:23+" /> to <framework src="com.android.support:appcompat-v7:+" /> will not resolve the issue. If you do the above, the build will still fail even if you remove all the others plugin from the project except ImagePicker.

Instead, you need to pin all the versions to v23+, because otherwise ImagePicker will break the build.
So for example, edit the plugin.xml of Diagnostic and change <framework src="com.android.support:appcompat-v7:+" /> to <framework src="com.android.support:appcompat-v7:23+" />

You'll need to them remove and re-add the Android platform to rebuild the Gradle config:

cordova platform rm android && cordova platform add android

@airstep
Copy link
Author

airstep commented Jun 5, 2017

Wow! It is working now!

Thank you so much for this great plugin and for quick response!

@dpa99c
Copy link
Owner

dpa99c commented Jun 5, 2017

Great, glad it's working. It's a shame these Gradle issues aren't more easily fixed.

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

No branches or pull requests

2 participants