Java 实现OpenBeans OpenBeans-1.0.jar时出错

Java 实现OpenBeans OpenBeans-1.0.jar时出错,java,android,android-gradle-plugin,repository,build.gradle,Java,Android,Android Gradle Plugin,Repository,Build.gradle,我的项目是在IntelliJ上的android studio上用Java编写的 我下载了openbeans-1.0.jar,将其放在我的libs文件夹中,转到项目结构,并将其添加到依赖项中。以下是我的build.gradle(:app)代码: 这是我使用gradle在网上找到的OpenBeans的MVN存储库信息(这只是我用来在build.gradle文件中创建行implementation'com.googlecode:OpenBeans:1.0'。我没有使用Maven): 我得到一个错误:

我的项目是在IntelliJ上的android studio上用Java编写的


我下载了openbeans-1.0.jar,将其放在我的libs文件夹中,转到项目结构,并将其添加到依赖项中。以下是我的build.gradle(:app)代码:

这是我使用gradle在网上找到的OpenBeans的MVN存储库信息(这只是我用来在build.gradle文件中创建行
implementation'com.googlecode:OpenBeans:1.0'
。我没有使用Maven):

我得到一个错误:

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'
我对使用存储库和编程还不熟悉。感谢您的帮助


谢谢大家!

“我下载了openbeans-1.0.jar,将它放在我的libs文件夹中,转到项目结构,并将其添加到依赖项中”--好吧,那么为什么还要尝试从Maven中提取它呢?如果您想使用JAR,请删除您试图拉入
com.googlecode.openbeans:openbeans:1.0
compile
implementation
行。我不知道在某个存储库中有一个
com.googlecode.openbeans
的副本--它没有出现。@commonware我不知道你说的“试图从Maven中获取它”是什么意思我甚至没有在这个项目中使用Maven。。。我将按照本线程的说明,正确地将.jar文件添加到IntelliJ项目中。“我不知道你所说的“尝试从Maven中提取”是什么意思“我甚至没有在这个项目中使用Maven”——你正在尝试从存储库中提取工件,其中大多数都是Maven存储库。“我正在按照这个线程中关于如何正确地将.jar文件添加到IntelliJ项目的说明进行操作”--似乎没有一个答案告诉您添加一条渐变线来从Maven坐标中引入,这就是编译组:'com.googlecode',名称:'openbeans',版本:“1.0”和
实现“com.googlecode.openbeans:openbeans:1.0”
。如果您想使用JAR,请删除这些行。相反,如果您希望从Maven存储库中获取这些内容(正如您的MVNRepository引用所建议的那样),则需要从删除JAR开始。然后,由于该工件位于一个非典型存储库中,您需要向模块中添加指令,以便向Gradle教授该存储库所在的位置。我从未使用过RedHat的Maven存储库,但可能是要使用的URL。所以,试试
repositories{maven{url“https://maven.repository.redhat.com/ga/“}}
。有关更多信息,请参阅。@commonware可能是因为误解了我的项目中的代码是什么,而不是什么。据我所知,我的代码中甚至没有提到maven。
编译组:'com.googlecode',名称:'openbeans',版本:'1.0'和实现'com.googlecode.openbeans:openbeans:1.0'
就是我在网站上看到的一个例子,我使用它作为可视化参考,以便在build.gradle文件中创建行
实现'com.googlecode:openbeans:1.0'
。在我的项目或代码中没有Maven实现,甚至没有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