Crosswalk Integration Beta in Ionic CLI (v1.3.2)

same error here with the plugin cordova imagepicker

@xMarston Iā€™m having that same WRITE_EXTERNAL_STORAGE issue also, hereā€™s my logs.

:processDebugManifest/Users/Comfy-Blitz/Development/Unbill/mobile/platforms/android/AndroidManifest.xml:33:9 Error:
	Element activity#com.facebook.LoginActivity at AndroidManifest.xml:33:9 duplicated with element declared at AndroidManifest.xml:21:9
/Users/Comfy-Blitz/Development/Unbill/mobile/platforms/android/AndroidManifest.xml:37:5 Error:
	Element uses-permission#android.permission.WRITE_EXTERNAL_STORAGE at AndroidManifest.xml:37:5 duplicated with element declared at AndroidManifest.xml:36:5
/Users/Comfy-Blitz/Development/Unbill/mobile/platforms/android/AndroidManifest.xml:0:0 Error:
	Validation failed, exiting
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed with multiple errors, see logs

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 20.022 secs

/Users/Comfy-Blitz/Development/Unbill/mobile/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: /Users/Comfy-Blitz/Development/Unbill/mobile/platforms/android/gradlew with args: assembleDebug,-b,/Users/Comfy-Blitz/Development/Unbill/mobile/platforms/android/build.gradle,-Dorg.gradle.daemon=true
Error: /Users/Comfy-Blitz/Development/Unbill/mobile/platforms/android/cordova/build: Command failed with exit code 8
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

This actually happens after I add in my plugins, it looks like one plugin is adding this line

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

And another adds this line

<uses-permission android:maxSdkVersion="18" android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
1 Like

Yeah, thatā€™s the issue. Did you add the File/File Transfer plugin and ShareSocial plugin?

Yup. Thatā€™s the problem. They both use a android:name thatā€™s the same. So how do we fix this issue? Is it a cordova problem?

Iā€™m also having this problem with the Pushwoosh plugin and Facebook plugin because they both use the same android:name also.

I seems I had build tools missing from env paths. I got it sorted out on another thread. Problem installing Crosswalk
thanks

Well, I found more problems, with the AdMob plugin (https://github.com/floatinghotpot/cordova-plugin-admob) or the LocalNotification when you try to build the app it shows this error:

error: cannot find symbol
                    ((ViewGroup) webView.getRootView()).addView(adViewLayout, params);
                                        ^
  symbol:   method getRootView()
  location: variable webView of type CordovaWebView

I know this may sound like a low-level issue but have been experimenting this after the last update. Iā€™m using Google Play Services with a plugin and now if I want re-log in after logging out, nothing happens and I tracked the problem down to mConnectionResult.startResolutionForResult(mActivity, RC_RESOLVE) not calling onActivityResult. Just wanted an experienced voice to tell me this could be caused by the unreleased version of cordova-android 4.0. This works perfectly without Crosswalk and was working well before the update.
Thanks!

@paneyi - yes, since weā€™re using an un-released version of cordova android 4.0, this most likely causes the issue. Iā€™ve gone ahead and gotten the latest commits from the cordova-android project and have them being release in 1.3.4 today.

@seanhill - iā€™ve seen some errors come across the cordova dev logs, basically they are working out the issue you are talking about right now. Stay tuned, and iā€™ll be trying to patch that up in the next week or so.

After removing the platform and plugin, updating the CLI to 1.3.4, adding crosswalk and, finally, building, it fails detailing ā€œplatforms/android/org.crosswalk.engine/colors-xwalk_core_library/AndroidManifest.xml (No such file or directory)ā€ā€¦ Anyone else has experienced this issue?

Also, I see that the org.apache.cordova.engine.crosswalk plugin folder has been substituted by org.crosswalk.engine. However, when adding the crosswalk support, the android platform still has an empty org.apache.cordova.engine.crosswalk folder.

@paneyi - I ran into this issue just once. Can you try this?
That name change was due to the way the cordova team changed the crosswalk plugin.

What does cordova plugin ls spit out?

android.support.v4 1.0.0 ā€œAndroid Support v4ā€
com.google.admobsdk 6.12.2 ā€œAdMob SDK for Android, iOS and WP8ā€
com.google.cordova.admob 2.5.0 ā€œAdMob PluginPro with Mediationsā€
com.google.playservices 19.0.0 ā€œGoogle Play Services for Androidā€
com.ionic.keyboard 1.0.3 ā€œKeyboardā€
com.potatoideas.cordova.plugin.playcenter 1.0.0 ā€œCordova PlayCenter pluginā€
com.rjfun.cordova.extension 1.0.5 ā€œCordova Plugin Extensionā€
nl.x-services.plugins.socialsharing 4.3.10 ā€œSocialSharingā€
org.apache.cordova.console 0.2.11 ā€œConsoleā€
org.apache.cordova.device 0.2.12 ā€œDeviceā€
org.apache.cordova.inappbrowser 0.5.4-dev ā€œInAppBrowserā€
org.apache.cordova.statusbar 0.1.8 ā€œStatusBarā€
org.apache.cordova.vibration 0.3.12 ā€œVibrationā€
org.crosswalk.engine 0.0.1-dev ā€œCrosswalk Engineā€

@paneyi - can you try running:
cordova platform rm android ionic browser add crosswalk

I was chasing this error down, but hadnā€™t been able to reproduce it. Sorry for not being more clear and knowing how to fix! Weā€™ll figure it out together!

@jbavari1, I donā€™t know if this is the expected behavior but, when I add the android platform, it also adds both plugin folders: org.apache.cordova.engine.crosswalk and org.crosswalk.engine (and the ls command shows both org.apache.cordova.engine.crosswalk 0.0.1-dev ā€œCrosswalk Engineā€ and org.crosswalk.engine 0.0.1-dev ā€œCrosswalk Engineā€).
If I then add crosswalk support, it also deletes org.apache.cordova.engine.crosswalk plugin folder.
If I revert to stock android, it adds again the deleted folder.

Also, org.crosswalk.engine/libs/xwalk_core_library only has the following files:

  • build_extras.gradle
  • xwalk.gradle

I ran the commands but nothing changed, the platform folder remains the same: empty org.apache.cordova.engine.crosswalk and org.crosswalk.engine without AndroidManifest.xml.

Whats in your engine directory? It looks like it isnt copying your crosswalk webview libraries into the plugin. Can you list what is in the engine directory?

platforms/android/org.crosswalk.engine only has one subfolder projectname-xwalk_core_library with files build_extras.gradle and xwalk.gradle. Just like plugins/org.crosswalk.engine/libs.

Should it copy some files from the plugins/org.apache.cordova.engine.crosswalk before deleting it?

After running ionic browser add crosswalk@10.39.235.15, Iā€™m getting:

Adding crosswalk browser

Downloading: https://github.com/driftyco/cordova-crosswalk-engine/archive/c0.6.1.zip
[=============================]  100%  0.0s

Downloaded cordova-crosswalk-engine

Downloading: https://github.com/driftyco/cordova-android/archive/c0.5.5.zip
[=============================]  100%  0.0s

āœ— (node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. // A couple hundred lines of this in red...

/Users/CURRENT_USER/.nvm/v0.10.32/lib/node_modules/ionic/node_modules/colors/colors.js:125
return str + '';
           ^
RangeError: Maximum call stack size exceeded

Iā€™m on:
Node - v0.10.32
Ionic CLI - v1.3.7
Cordova - v4.2.0
Ionic Beta 14
On a Mac.

Havenā€™t seen this mentioned anywhere else. Donā€™t know what might be the cause of this error? Googling it leads to this pretty popular Stackoverflow answer, but I canā€™t see how to use it. Donā€™t quite want to disturb any of the ionic code too.

Edit: For now, Iā€™ve re-built back to non-crosswalk Android.

I got that error and then when i ran it the command again i got:

There was an error adding the Cordova Android library
Running command: /Users/WebstormProjects/camd100/caApp100/hooks/before_platform_add/init_directories.js /Users/WebstormProjects/camd100/caApp100
Creating android projectā€¦
Error: /Users/WebstormProjects/camd100/caApp100/engine/cordova-android-c0.5.5/bin/create: Command failed with exit code EACCES
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:818:12)
(CLI v1.3.7)

My ionic info is:

OS: Mac OS X Yosemite
Node Version: v0.10.36
Cordova CLI: 4.2.0
Ionic Version: 1.0.0-beta.14
Ionic CLI Version: 1.3.7
Xcode version: Xcode 6.1.1 Build version 6A2008a
ios-sim version: 3.1.1