I have not included gson-2.3.1.jar to my dependencies on gradle.build file. But it gives me below error when going to sync it.
Error:A problem occurred configuring project ':app'.
Could not download gson.jar (com.google.code.gson:gson:2.3.1) Could not get resource 'https://jcenter.bintray.com/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar'. Could not GET 'https://jcenter.bintray.com/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar'. Connection to https://jcenter.bintray.com refused
Why it gives me such error and why it looks for gson. Yes before i have added it. but then excluded it from dependencies list. Here is my gradle files:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "az.epul.myapplication"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
}
What i noticed, if i am going to add retrofit.jar to lib and then adding it to dependencies on build.gradle file such way => compile files('libs/retrofit-1.9.0.jar') it works, but direct adding with compile 'com.squareup.retrofit:retrofit:1.9.0' not works