Can crosswalk-cordova be used inside Android Studio?

Is it possible to create a crosswalk application inside the Android studio?

It looks like you need to use ANT at this point.

Does anyone know if this is on the roadmap now when the android studio is out of beta?

Our team just built an Android application for Android, so we need to use Android studio to create the assembly, and we would like to start using the crosswalk.

+6
source share
3 answers

I put together a few instructions here: https://diego.org/2015/01/07/embedding-crosswalk-in-android-studio/

You can do this with gradle by adding a maven repo:

repositories { maven { url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' } } 

And then the pedestrian crossing version you want:

 compile 'org.xwalk:xwalk_core_library:10.39.235.15' 

Code example: https://github.com/dougdiego/CrosswalkDemo

+7
source

I was able to get this job. You need to slightly rebuild the project structure and use the "modules". I created the CordovaLib module and the xwalk_core_library module as "Android libraries", and I referenced CordovaLib from my main project and installed xwalk_core_library as the reliability for cordovalib.

Be sure to create xwalk_core_library under the package name org.xwalk.core.

See screenshot for project structure and xwalk_core_library gradle file.

Put the .so files in the jniLibs directory and the android assembly will pack them correctly in your application.

I followed this article to help create. I plan to create separate builds for x86 and arm. http://ph0b.com/android-studio-gradle-and-ndk-integration/#mygradlefile

It works for me in this github project. Let me know if you have any problems. https://github.com/twilly86/CrossWalkAndroidStudio

enter image description here

+6
source

In my case, a project with version 4.1.1 (for example, Cordova CLI version 5.2.0) for android cordova, Android Studio version can create a project.

However, a project with version 5.1.1 (for example, Cordova CLI version 6.2.0) from Cordova, Android Studio version cannot build the project, because Gradle synchronization leads to an error, for example,

 exception during working with external system: ndk 

The critical difference between 4.1.1 and 5.1.1 is the build.gradle file.

In 4.1.1, the build.gradle file selects the appropriate version of the Gradle version and the Android version. (e.g. Gradle version 2.2 and plugin version 1.0.0 +).

In 5.1.1, the build.gradle file does not.

I fix this problem by manually installing the Gradle version to version 2.2 and the plugin version 1.0.0. You can do this in Android Studio by opening the File > Project Structure > Project dialog box.

0
source

Source: https://habr.com/ru/post/974225/


All Articles