Zabs
Zabs

Reputation: 14142

Cordova app build failed - configuring root project 'android' error message

I am updating my Windows 10 to the latest versions of Cordova/Android etc..

I have run the basic cordova commands to create a new app, & download the android platform. However each time I try to add the platform I get the following error in the command prompt - any ideas?

Full output here - https://gist.github.com/anonymous/d2d108222fae0ee81f4d334841c3c473

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 download gradle-core.jar (com.android.tools.build:gradle-core:2.2.0) Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle-core/2.2.0/gradle-core-2.2.0.jar'. Failed to move file 'C:\Users\gavin\AppData\Local\Temp\gradle_download2322608055650185333bin' into filestore at 'C:\Users\gavin.gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle-core\2.2.0\b566730c2a4bcd6288d03a16a57960eec0c2b2a8\gradle-core-2.2.0.jar'

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

Upvotes: 2

Views: 1974

Answers (2)

Raphael Campos
Raphael Campos

Reputation: 1

I had the same problem on windows, so I downloaded a new gradle in the C:\Gradle folder and set the environment variable to C: \ Gradle \ gradle-4.4.1 \ bin

Upvotes: 0

Zabs
Zabs

Reputation: 14142

Seems Android wasn't fully installed properly - I downloaded all of the newer system images, added ANT to the system environment & restarted my machine. After I ran the build command again it worked, weirdly I notice sometimes a build command needs to be run twice for it to work, which makes little sense...

Upvotes: 0

Related Questions