问题描述
我的项目在IntelliJ上的android studio上使用Java。
我下载了openbeans-1.0.jar,将其放在我的libs文件夹中,转到项目结构,并将其添加到依赖项中。这是我的build.gradle(:app)代码:
apply plugin: 'com.android.application'
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsversion "30.0.2"
defaultConfig {
applicationId "com.example.gotimejavaversion"
minSdkVersion 15
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),'proguard-rules.pro'
}
}
}
dependencies {
implementation filetree(dir: "libs",include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.opencsv:opencsv:5.2'
implementation 'com.googlecode:openbeans:1.0'
implementation 'com.univocity:univocity-parsers:2.9.0'
}
这是我使用gradle在网上为OpenBeans找到的MVN存储库信息(这只是我用于在build.gradle文件中创建行implementation 'com.googlecode:openbeans:1.0'
的可视参考。我不使用Maven):
// https://mvnrepository.com/artifact/com.googlecode/openbeans
compile group: 'com.googlecode',name: 'openbeans',version: '1.0'
我得到了错误:
Could not determine the dependencies of task ':app:compileDebugRenderscript'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not find com.googlecode:openbeans:1.0.
required by:
project :app
Possible solution:
- Declare repository providing the artifact,see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
我无法确定文档中做错了什么。我已经检查了如何多次键入它,并尝试过implementation 'com.googlecode.openbeans:openbeans:1.0'
,这是我第一次使用存储库和程序。任何帮助表示赞赏。
谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)