Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

1.3.0 version not compatible with "crosswalk" by PGB #199

Closed
bau720123 opened this issue Oct 4, 2015 · 11 comments
Closed

1.3.0 version not compatible with "crosswalk" by PGB #199

bau720123 opened this issue Oct 4, 2015 · 11 comments

Comments

@bau720123
Copy link

hi @macdonst
I am using PGB 5.2.0 version with gradle build (for now is support)
when I install the crosswalk plugin from different resource,it will cause Android build fail (if only install push 1.3.0,it will build success)
like these way

<preference name="phonegap-version" value="cli-5.2.0" />
<preference name="android-build-tool" value="gradle" />
<gap:plugin name="phonegap-plugin-push" source="npm" version="1.3.0" />
<gap:plugin name="cordova-plugin-crosswalk-webview" source="npm" version="1.3.1" />
<preference name="phonegap-version" value="cli-5.2.0" />
<preference name="android-build-tool" value="gradle" />
<gap:plugin name="phonegap-plugin-push" source="npm" version="1.3.0" />
<gap:plugin name="dispatch-cordova-plugin-crosswalk-webview " source="npm" version="1.4.1" />
<preference name="phonegap-version" value="cli-5.2.0" />
<preference name="android-build-tool" value="gradle" />
<gap:plugin name="phonegap-plugin-push" source="npm" version="1.3.0" />
<gap:plugin name="cordova-plugin-crosswalk-webview-pgb-adapt " source="npm" version="1.4.0-dev-5" />

so...hope this issue can solve by push 1.4.0 version

@macdonst
Copy link
Member

macdonst commented Oct 4, 2015

@bau720123 Sorry which ones of those 3 different snippets builds correctly and which ones do not?

@bau720123
Copy link
Author

oh @macdonst
let me explain it
the "cordova-plugin-crosswalk-webview" is the official,others are forks
if only install the one of them (crosswalk plugin),it will all build success

but after add "phonegap-plugin-push" 1.3.0,it become all fail
hope my explain is clear

@bau720123
Copy link
Author

by the way
if install the resource from PGB

them are all forks

<gap:plugin name="phonegap-plugin-push" source="npm" version="1.3.0" />
<gap:plugin name="com.flyacts.crosswalk.engine" source="pgb" version="1.3.1" />

or

<gap:plugin name="phonegap-plugin-push" source="npm" version="1.3.0" />
<gap:plugin name="org.crosswalk.engine" source="pgb" version="1.3.0" />

although it will build success,but I think it is not a Long-term solution

@bau720123
Copy link
Author

hi @macdonst
I have already contact to the "cordova-plugin-crosswalk-webview-pgb-adapt" author
there are related information and want to feedback to you too

This is related to xwalk 16.4x versions which use android support lib v13. 
Phonegap-plugin-push use it as well but not with the same version and when you try to compile it, there's a conflict. 
This issue is discussed in the official crosswalk bug tracker : https://crosswalk-project.org/jira/browse/XWALK-5092

I forked quickly the official phonegap-puglin-push and removed the support lib v13 compilation instruction and it seems to work.

If you want to use my forked copy of the plugins, you have to add these lines in your config.xml :
<gap:plugin name="cordova-plugin-crosswalk-webview-pgb-adapt" source="npm" version="1.4.0-dev-9"/>
<gap:plugin name="phonegap-plugin-push-without-android-support-v13" source="npm" version="1.3.0-dev-1" />

The npm page is here : 
https://www.npmjs.com/package/phonegap-plugin-push-without-android-support-v13

Hope it will help you.

@macdonst
Copy link
Member

macdonst commented Oct 5, 2015

@bau720123 where did you have this conversation with Crosswalk team? I want to chime in as it doesn't seem like they are including the support library correctly. Possibly I can help or downgrade the version of the library used with this plugin to match them.

@bau720123
Copy link
Author

hi @macdonst
above conversation content all in the email (I contact with "cordova-plugin-crosswalk-webview-pgb-adapt" author,and he gives me a reply)
maybe the link that is you want it ?
https://crosswalk-project.org/jira/browse/XWALK-5092

@fredgalvao
Copy link
Collaborator

Different versions of android-support shouldn't make it fail, gradle is made to handle such cases gracefully, unless the difference between said versions is too big so that it can't find a minimal common path. They are probably including the jar in some way.

@dnish
Copy link

dnish commented Oct 6, 2015

I'm having the same issue on my Meteor application:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)

Only happens when I add this plugin. I'm also using cordova-plugin-crosswalk-webviewl

@berthnipub
Copy link

I am in holiday but i know that my build causes problems so i did another build (dev-11) using xwalk 15.44.384 (without dependency with android support vx) so i guess you should be able to build your projects without failure.

Add these lines to your config.xml :

<preference name="android-build-tool" value="gradle" />
<gap:plugin name="phonegap-plugin-push" source="npm" version="1.3.0" />
<gap:plugin name="cordova-plugin-crosswalk-webview-pgb-adapt" source="npm" version="1.4.0-dev-11"/>

@bau720123
Copy link
Author

hi @macdonst @berthnipub
just like @berthnipub said
solved

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants