Divyaadz
Divyaadz

Reputation: 175

Phonegap Build is failing due to dependency error

Im building the Phonegap App using Phonegap Build. Phonegap Build cant create Android APK, build is failing with below error, Morning I was able to create the APK but now below error is thrown. Note that there is no config file changes between morning and now.

Please help App Id: 2074580 https://build.phonegap.com/apps/2074580/builds

Could not resolve all dependencies for configuration ':_debugCompile'.

Could not find com.android.support:support-v4:23.4.0. Searched in the following locations: https://repo1.maven.org/maven2/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom https://repo1.maven.org/maven2/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/suppo rt-v4-23.4.0.pom file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/suppo rt-v4-23.4.0.jar file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.4.0/suppor t-v4-23.4.0.pom file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.4.0/suppor t-v4-23.4.0.jar Required by: :project:unspecified

Upvotes: 0

Views: 534

Answers (2)

Alfonso
Alfonso

Reputation: 76

I had a similar problem with this plugin. I needed to update some android libraries. This command solved it all for me:

android update sdk --no-ui --all --filter "extra-android-m2repository"

If you don't have the android command in your command line, you can navigate to the SDK directory.

Upvotes: 1

Jasper
Jasper

Reputation: 1837

Answered here; https://github.com/phonegap/phonegap-plugin-push/issues/928. You need to switch back to Cordova version 1.6.3 or 1.6.4. But I just checked and upgrading to the latest nightly build also seems to fix it. When working in Visual Studio, clear the cordova cache too (after setting the correct version):

Tools => Options => Tools for Apache Cordova => Clear Cordova Cache.

Upvotes: 0

Related Questions