Skip to content Skip to sidebar Skip to footer

Visual Studio 2015 - Apache Cordova Build Error

I am using visual studio 2015 in windows 8. I created a hybrid app when i tried to build the project i get following error .am running in vs android emulator kitkat 5.5' .but when

Solution 1:

You are probably behind a corporate proxy because, gradle has failed to download to your system.

--> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.5.0/gradle-1.5.0.pom

Android builds packages with Gradle.

Either authentication is required or https links are blocked.

Possible Solutions:

Fiddler can help to allow tools to authenticate automatically ( see menu options...), you will need to point your proxy settings to fiddler and allow fiddler to act as proxy for your system.

Secondly goto the android sdk folder, search for https in config files and change it to http. Normally this can help you to download the gradle package.

Install gradle yourself: make the download yourself (from the browser) and unzip the contents as is in your user directory under .gradle\ I also added proxy settings to this folder for proxy settings: gradle.properties with following contents:

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

Environment variable _JAVA_OPTIONS

From commandline:

setx_JAVA_OPTIONS="-Xmx512M -Dhttp.proxyHost="localhost" -Dhttp.proxyPort="8888" -Dhttps.proxyHost="localhost" -Dhttps.proxyPort="8888" -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true"

The Memory constraint (-Xmx...) were also added for building these Cordova packages!

Solution 2:

This work for me.now project is build successfully after many tries.there is no proxy error i think there may be any error accesing maven gradle link.may be the project is not taking https links. this link is http so it is working smoothly. change the gradle.build like this inside cordovaLib and also common for project Make this changes to the top-level build.gradle file.

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript{
    repositories {
        //jcenter()
        jcenter {
            url "http://jcenter.bintray.com/" 
        }
    }
}

allprojects {
    repositories {
        //jcenter()
        jcenter {
            url "http://jcenter.bintray.com/" 
        }
    }
}

Post a Comment for "Visual Studio 2015 - Apache Cordova Build Error"