Montag, 1. Februar 2016

Android Studio. FAILURE: Build failed with an exception. Could not resolve https://

A common issue with Android Studio behind Corporate Firewalls is fetching dependencies from HTTPS Urls:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not resolve com.facebook.android:facebook-android-sdk:4.9.0.
     Required by:
         flirtbox_flirtbox-android:app:unspecified
      > Could not resolve com.facebook.android:facebook-android-sdk:4.9.0.
         > Could not get resource 'https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/4.9.0/facebook-android-sdk-4.9.0.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/4.9.0/facebook-android-sdk-4.9.0.pom'.
               > Connection to https://jcenter.bintray.com refused
      > Could not resolve com.facebook.android:facebook-android-sdk:4.9.0.
         > Could not get resource 'https://oss.sonatype.org/content/repositories/snapshots/com/facebook/android/facebook-android-sdk/4.9.0/facebook-android-sdk-4.9.0.pom'.
            > Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/com/facebook/android/facebook-android-sdk/4.9.0/facebook-android-sdk-4.9.0.pom'.
               > Connection to https://oss.sonatype.org refused
      > Could not resolve com.facebook.android:facebook-android-sdk:4.9.0.
         > Could not get resource 'https://maven.fabric.io/public/com/facebook/android/facebook-android-sdk/4.9.0/facebook-android-sdk-4.9.0.pom'.
            > Could not GET 'https://maven.fabric.io/public/com/facebook/android/facebook-android-sdk/4.9.0/facebook-android-sdk-4.9.0.pom'.
               > Connection to https://maven.fabric.io refused

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

The easy solution is to tick the checkbox that says, Android Studio should fallback to http instead of https:

Android Studio / Build failed due to HTTPS dependencies

Keine Kommentare:

Kommentar veröffentlichen