Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error while adding the dependency #39

Closed
sdutta9 opened this issue Jul 5, 2016 · 9 comments
Closed

Getting error while adding the dependency #39

sdutta9 opened this issue Jul 5, 2016 · 9 comments
Assignees
Labels

Comments

@sdutta9
Copy link

sdutta9 commented Jul 5, 2016

Hi I am new to android. As you mentioned in your read me file. I added a dependency in build.gradle file. When I am trying to sync my gradle file I am getting the below error.

"Error:(27, 13) Failed to resolve: de.codecrafters.tableview:tableview:2.1.0"

Can you please help me understand as to how I can add dependency in my application. Is there any other step that needs to be done apart from putting an entry in the gradle file?

@ISchwarz23
Copy link
Owner

Hi @sdutta9,

could you please post the content of your 'dependencies' section of your gradle file inside the "App" folder?

Best regards,
Ingo

@sdutta9
Copy link
Author

sdutta9 commented Jul 6, 2016

Below is my complete build.gradle file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "shouvik.dutta.serviceupdate"
    minSdkVersion 11
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}
repositories {
mavenCentral()
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'de.codecrafters.tableview:tableview:2.1.0'
}

@sdutta9
Copy link
Author

sdutta9 commented Jul 6, 2016

Screenshot of the error:

gradle_error

@ISchwarz23
Copy link
Owner

In 'repositories' you state 'mavenCentral()' but this library is on JCenter. So you could add 'jcenter()' or replace 'mavenCentral()' by it.

@sdutta9
Copy link
Author

sdutta9 commented Jul 6, 2016

Getting the same error even after replacing mavenCentral() with jcenter().

@ISchwarz23
Copy link
Owner

Could you please post the content of the build.gradle in your root folder?

@sdutta9
Copy link
Author

sdutta9 commented Jul 6, 2016

Below is my complete build.gradle file in root folder:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

@ISchwarz23
Copy link
Owner

Do you see an error, if you execute a clean of your project?

@ISchwarz23 ISchwarz23 self-assigned this Jul 18, 2016
@ashorekumar
Copy link

I resolved this issue by adding

maven { url "http://jcenter.bintray.com"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants