Search code examples
cordovacordova-pluginscrosswalk

Error building xwalk with cordova android


Building a cordova app with xwalk and it's no longer working.

ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk JAVA_HOME=C:\Program Files\Java\jdk1.8.0_77 Reading build config file: f:\source\Cutter\Canvasser\build.json null embedded org.xwalk:xwalk_core_library:15+

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 4.251 secs

Connection to http://127.0.0.1:8888 refused

Can anyone help? I don't understand why it's a maven repository which can't be found.


Solution

  • I had the same problem and finally solved it.

    There is a file $(ProjectDir)platforms\android\gradle.properties that contains, What a surprise! Gradle properties. In my case the following was the content:

    systemProp.http.proxyHost=127.0.0.1
    systemProp.http.proxyPort=8888
    systemProp.https.proxyHost=127.0.0.1
    systemProp.https.proxyPort=8888
    

    Just remove those entries, save the file and problem solved!

    To reproduce the problem. Open Fiddler, create a new cordova project, add the xwalk plugin and build the project. You will see an authentication error. Close Fiddler, build the project again, you will see the error you have.

    Moral: don't create cordova projects while Fiddler is running.