mart_-
mart_-

Reputation: 227

android studio gradle ion

I would like use the module ion (https://github.com/koush/ion#get-ion) for my app android but I can't install this module with gradle.

Got this error :

Error:(25, 0) Could not find method compile() for arguments[com.koushikdutta.ion:ion:2.1.9] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

build.gradle :

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.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
}

dependencies {
    compile 'com.koushikdutta.ion:ion:2.1.9'
}

Thank you in advance for the answer

Upvotes: 2

Views: 2889

Answers (1)

Murat Karagöz
Murat Karagöz

Reputation: 37604

You have to put the dependency in the module gradle and not in the project gradle.

It's located under YourProject/app/build.gradle

Upvotes: 2

Related Questions