Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

  • What went wrong: A problem occurred configuring root project 'android'.

    Could not resolve all dependencies for configuration ':_armv7DebugCompile'. Could not resolve org.xwalk:xwalk_core_library:15+. Required by: :android:unspecified Failed to list versions for org.xwalk:xwalk_core_library. Unable to load Maven meta-data from https://repo1.maven.org/maven2/org/xwalk/xwalk_core_library/maven-metadata.xml. Could not GET 'https://repo1.maven.org/maven2/org/xwalk/xwalk_core_library/maven-metadata.xml'. Connection to http://127.0.0.1:8888 refused Failed to list versions for org.xwalk:xwalk_core_library. Unable to load Maven meta-data from https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library/maven-metadata.xml. Could not GET 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library/maven-metadata.xml'.

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.

like image 581
JoshBerke Avatar asked Apr 15 '16 19:04

JoshBerke


3 Answers

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.

like image 53
Jesús López Avatar answered Oct 27 '22 04:10

Jesús López


Check this link out: https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview/issues/158

Here's the quote from the post:

"This can solve the issue for latest crosswalk version.

Open platforms\android\cordova-plugin-crosswalk-webview\eqp-xwalk.gradle

change this:

dependencies {
    xwalkSpec
}

to this one:

dependencies {
   compile 'org.xwalk:xwalk_core_library:23.53.589.4' //xwalkSpec
}

CrossWalk is discontinued, so you can left this and avoid future checks."

like image 28
Hello Avatar answered Oct 27 '22 05:10

Hello


If you are receiving the following error after September 2017:

 Could not resolve org.xwalk:xwalk_core_library:23+.

Open

platforms\android\cordova-plugin-crosswalk-webview\eqp-xwalk.gradle in a regular cordova project

or

platforms\android\cordova-plugin-crosswalk-webview\starter-xwalk.gradle in an ionic project and replace

dependencies {
    xwalkSpec
}

with:

dependencies {
    compile 'org.xwalk:xwalk_core_library:23.53.589.4'
}
like image 32
Peter Meadley Avatar answered Oct 27 '22 06:10

Peter Meadley