2
Я хотел бы использовать модуль ion (https://github.com/koush/ion#get-ion) для моего Android-приложения, но я не могу установить этот модуль с помощью градиента.android studio gradle ion
Получил эту ошибку:
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'
}
Заранее спасибо за ответ
Это проект Gradle. Здесь вы не записываете зависимости приложений. Найдите файл градиента модуля в '[projectName] \ app \ build.gradle' и добавьте эту зависимость там. –