5

I apologize for my noob question, however i cannot understand how i import dependencies using gradle.

I have tried importing sqlite4javaand my build.gradle file looks like this:

apply plugin: 'java'
apply plugin: 'idea'


repositories {
    jcenter()
}

dependencies {
    compile 'org.slf4j:slf4j-api:1.7.21'
    compile "com.almworks.sqlite4java:sqlite4java:1.0.392"
    testCompile 'junit:junit:4.12'
}

I have tried using:

import com.almworks.sqlite4java.SQLiteConnection;
import com.almworks.sqlite4java.SQLiteStatement;

To import the sqlite4java classes but i keep getting compiler errors when i run gradle build.

How do i access the sqlite4java classes.

Thomas
  • 537
  • 1
  • 4
  • 14
  • Check this topic in the documentation: http://stackoverflow.com/documentation/android-gradle/3289/declare-dependencies/11289/how-to-add-a-repository#t=201609150734182370102 – Gabriele Mariotti Sep 15 '16 at 07:33

1 Answers1

3

I think that problem is you didn't attach central maven repository to your project. Try to modify your repositories section:

repositories {
    jcenter()
    mavenCentral()
}
a.yekimov
  • 316
  • 1
  • 8