2

I begun trying Cordova some days ago. Installed everything to fulfill Cordova requirements for the platforms I added to my test app (android, iOS)

Enriques-iMac:gobSJ kike$ cordova requirements

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-25,android-23,android-22,android-19
Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-3.2/bin/gradle

Requirements check results for ios:
Apple OS X: installed darwin
Xcode: installed 8.3.3
ios-deploy: installed 1.9.1
CocoaPods: installed  

Then I tried to build and gradle didn't like my proxy. I set proxy for npm, environment, etc. and worked until gradle took 40 minutes to give the following output

Enriques-iMac:gobSJ kike$ cordova build
Searching for new pods
Checking cordova-plugin-whitelist for pods.
Checking config.xml for pods.
Installing pods
Sit back and relax this could take a while.
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project

Sending stats

Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.


[!] The Podfile does not contain any dependencies.


Updating ios build to use workspace.
Adding schemes
ANDROID_HOME=/Users/kike/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
Starting a Gradle Daemon (subsequent builds will be faster)
:wrapper

BUILD SUCCESSFUL

Total time: 7.692 secs
Subproject Path: CordovaLib
Starting a Gradle Daemon, 2 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:2.2.3.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:2.2.3.
         > Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
            > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
               > Malformed reply from SOCKS server
      > Could not resolve com.android.tools.build:gradle:2.2.3.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
               > Malformed reply from SOCKS server

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 40 mins 10.095 secs
Error: /Users/kike/gobSJ/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:2.2.3.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:2.2.3.
         > Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
            > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
               > Malformed reply from SOCKS server
      > Could not resolve com.android.tools.build:gradle:2.2.3.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
               > Malformed reply from SOCKS server

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Enriques-iMac:gobSJ kike$ 

Is there anything I could do to solve this? I'm behind this corporate proxy which I can't disable. Thanks

Enrique
  • 1,015
  • 4
  • 27
  • 54
  • I've tried creating gradle.properties in /Users/kike/gradle.properties and also in the /Users/kike/myapp/platforms/android/gradle.properties and putting this info with my own values, without luck https://pastebin.com/snxXy3A4 – Enrique Jun 07 '17 at 16:41
  • Any update on this issue? I also encounter this issue, when trying to build an ionic app. – Takao Baltazar Jan 09 '19 at 09:09
  • @TakaoBaltazar nothing. I've finally removed proxy from everywhere and started again. This was months ago. Maybe with newer versions/updates there's an easier way, but haven't done research about that since removed proxy – Enrique Jan 10 '19 at 12:46
  • 1
    Thanks for the response. I was actually trying to build the application inside an intranet network, that's why there are a lot of restriction. I will try this at home instead, If I have enough time. – Takao Baltazar Jan 11 '19 at 02:05

0 Answers0