jitpack.io failed to resolve github repo

I have a Github repo and pushed tags on it.

This is my gradle file of my main project.

  • How to clone source code of Android marshallow
  • $.ajax() on phonegap
  • Build project imported from Eclipse git as Android Project
  • Git - Android Studio no longer lets me commit changes and push to GitHub
  • How to Import Module without creating copy in Android Studio
  • Unable to execute DX - IntelliJ Idea (Android + Maven)
  • apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.0"
    
        defaultConfig {
            applicationId "dropbox.ric.es.myapplication"
            minSdkVersion 16
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    repositories {
        //mavenCentral()
        //jcenter()
    
        maven { url "https://jitpack.io" }
    
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:23.0.1'
        compile 'com.github.rchampa:DropboxHttpConector:1.0.1'
    }
    

    But when I sync gradle I have the following error Failed to resolve com.github.rchampa:DropboxHttpConector:1.0.1

    Another attempt:

    allprojects {
        repositories {
            jcenter()
            maven { url "https://jitpack.io" }
        }
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:23.0.1'
        compile 'com.github.rchampa:DropboxHttpConector:1.0.1'
    }
    

    Still failing.

  • How to remove local git history after a commit?
  • Git doesn't find repository
  • RStudio gives “Incorrect function” when setting git as Version control
  • How can I fetch git objects using the smart protocol (raw) over http?
  • how to track certain files in subdirectories but not all the other files with git?
  • Deploying existing Django app on Heroku
  • 4 Solutions collect form web for “jitpack.io failed to resolve github repo”

    For anyone else that made the simple mistake I made:

    Ensure you add the maven { url "https://jitpack.io" } under allprojects instead of buildscript. XD

    Project build.gradle file:

    buildscript {
        repositories {
            jcenter()
            // DO NOT ADD IT HERE!!!
        }
        ...
    }
    
    allprojects {
        repositories {
            mavenLocal()
            jcenter()
            // ADD IT HERE
            maven { url "https://jitpack.io" }
        }
    }
    

    Thanks to Alexander Pacha for pointing that out in a comment above.

    I have several dependencies from Jitpack and I encountered this issue after migrating to Gradle 2.

    The solution in my case was to change the version in distributionUrl in gradle-wrapper.properties from 2.10 (which was automatically set by Studio when I accepted updating the wrapper version) to the latest one.

    After a few attempts and thanks to jitpack support now I can import my library hosted in Github as a Android Gradle dependency.

    I will provide a a few very useful links:

    How setup your java library

    https://jitpack.io/docs/BUILDING/#gradle-projects
    

    How check logs of your dependency in jitpack

    https://jitpack.io/com/github/USER/REPO/TAG/build.log
    

    In my case

    https://jitpack.io/com/github/rchampa/DropboxHttpConector/1.0.3/build.log
    

    I meet this problem when I try to import orhanobut/logger from github.
    Then I go to jitpack.io and search for the package:
    find logger in jitpack
    Then I clicked the log icon,and found:

    Start: Thu Jan 14 11:56:56 UTC 2016
    Git:v1.9
    commit 5abbc1563422457d4c23e1a0a412d2b0c7dc334e
    Merge: 8ef1e6b 522d44d
    Author: Orhan Obut
    Date: Mon May 25 11:34:20 2015 +0200

    Merge pull request #30 from orhanobut/oo/settings-fix
    submodule status:
    Run gradle build
    Gradle build script
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    Downloading https://services.gradle.org/distributions/gradle-2.2.1- all.zip

    So this is it,it use gradle 2.2.1-all!

    Then I go to my project and change gradle version to 2.2.1 in settings.gradle, everything worked fine!

    Git Baby is a git and github fan, let's start git clone.