gpt4 book ai didi

java - android studio gradle ionic

转载 作者:搜寻专家 更新时间:2023-11-01 08:31:23 24 4
gpt4 key购买 nike

我想为我的 android 应用程序使用模块 ion ( https://github.com/koush/ion#get-ion),但我无法使用 gradle 安装此模块。

遇到这个错误:

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.

构建.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 而不是项目 gradle 中。

它位于YourProject/app/build.gradle

关于java - android studio gradle ionic ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40405742/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com