gpt4 book ai didi

android - 找不到参数的方法 api() [目录 'libs']

转载 作者:太空宇宙 更新时间:2023-11-03 10:34:32 25 4
gpt4 key购买 nike

打开文件

这是我的 gradle 文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.0.1"
defaultConfig {
applicationId "com.landdrops.cricketfantacy.androidbottom"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.0.1'
implementation 'com.android.support:design:27.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test.runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
}

我得到了

Error:(23, 0) Could not find method implementation() for arguments [directory 'libs'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. Open File

最佳答案

对于我的 Java 库项目,我需要使用 java-library 插件而不是 java:

- apply plugin: 'java'
+ apply plugin: 'java-library'

关于android - 找不到参数的方法 api() [目录 'libs'],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49423330/

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