0

I've got a custom android project in IntelliJ IDEA 15. We are using the default Android webview now, but want to replace it with crosswalks XWalkView.

I've read and tried a lot of options, but can't get the XWalkView to resolve. What have I tried?

  1. Following this tutorial: https://crosswalk-project.org/documentation/android/embedding_crosswalk.html

    • downloading the source crosswalk-17.46.448.10.zip
    • importing xwalk_core_library as a new library project in IntelliJ
    • build the project
    • add this project as a library dependency in my project
  2. Try to add the maven dependency to (https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library/17.46.448.10/) to the existing android project

1 Answers1

0

In your build.gradle file, add this:

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

And to the dependencies,

dependencies {
    compile 'org.xwalk:xwalk_core_library:10.39.235.15'
}

Bingo!

cprakashagr
  • 751
  • 11
  • 28
  • Thanks! But there is no build.gradle in my project? – Kapitein Witbaard Mar 11 '16 at 13:00
  • Are you using Gradle based automation tool? – cprakashagr Mar 11 '16 at 13:01
  • `Build.gradle` file is likely to be in two or more locations. One Application level and the other, module level. You need to find the module level file and make the required changes. As an example of the tree structure, navigate to the app folder here: https://github.com/cprakashagr/JNI-Example You could see build.gradle file. – cprakashagr Mar 11 '16 at 13:05
  • Nope I think IntelliJ IDEA 15 uses ANT as default automation tool. Also the downloadable crosswalk project in step 1 is ANT based... – Kapitein Witbaard Mar 11 '16 at 13:07
  • If you are making your app from scratch, would suggest you to use Gradle based ones. Though, I have worked with ANT based crosswalk project, will check around this and get back to you soon. – cprakashagr Mar 11 '16 at 13:10