1

NOTE: This is a followup of my last question that still remained unsolved.

I'm using a fully updated AndroidStudio with the default gradle support. Android Studio can self update (thus sees Internet for sure). I have no reason to beleive that Gradle can't reach the internet nor any error that could imply that, and I verified that it's not on offline mode.

Here's my Here's my top-level build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

and here's my app/build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "com.domain.app"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.github.jitpack:android-example:1.0.4'  
}

Here I'm trying to pull the jitpack.io sample, and still getting:

Error:(31, 13) Failed to resolve: com.github.jitpack:android-example:1.0.4

without any additional information.

Community
  • 1
  • 1
shebang
  • 79
  • 1
  • 7

2 Answers2

0

try this :

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

Then in your app/build.gradle :

apply plugin: 'com.android.application'

repositories {
    maven { url "https://jitpack.io" }
    flatDir {
        dirs 'libs'
    }
}


android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "com.domain.app"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.github.jitpack:android-example:1.0.4'  
}
Thilek
  • 676
  • 6
  • 18
0

Its not the problem of android studio, To inform you

Neither

compile 'com.github.jitpack:android-example:1.0.4' 

Nor

compile 'com.github.User:Repo:Tag'

Both doesn't compile now, Because it's no longer available in the The Central Repository. You don't have any ways rather than seeing the codes inside.

Shree Krishna
  • 8,474
  • 6
  • 40
  • 68
  • but then how come I'm the only one experiencing this error? – shebang Mar 16 '16 at 08:56
  • I'm only one means ? Its me too. – Shree Krishna Mar 16 '16 at 08:59
  • well, if you look at the [my previous](http://stackoverflow.com/questions/35983298/jitpack-io-failure-to-resolve) question you see a member for whom it works. also, it would mean that `jitpack.io` is now useless if you're right. – shebang Mar 16 '16 at 09:27
  • I've tried changing my whole gradle version but still not resolved, So this won't work.... This may worked but now doesn't.. – Shree Krishna Mar 16 '16 at 09:58