最初我在我的项目中使用 Jcabi 库。找到 Jsch 库后,我决定停止使用 Jcabi,并犯了一个不幸的错误,即删除了我项目的文件夹jcabi-ssh-1.6.1.jar
内部libs
:
AndroidStudioProjects/Project1/mobile/libs:
.
└── jsch-0.1.54.jar
jcabi-ssh-1.6.1.jar
0 directories, 2 files
现在,在构建项目时,Gradle 返回了一些错误:
Transform output file /home/spoiledgoods/AndroidStudioProjects/Project1/mobile/libs/jcabi-ssh-1.6.1.jar does not exist.
org.gradle.api.UncheckedIOException: Failed to capture snapshot of input files for task ':mobile:javaPreCompileDebug' property 'compileClasspaths' during up-to-date check.
...
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':mobile:debugCompileClasspath'.
...
Caused by: org.gradle.api.artifacts.transform.ArtifactTransformException: Failed to transform file 'jcabi-ssh-1.6.1.jar' to match attributes {artifactType=android-classes} using transform JarTransform
...
Caused by: org.gradle.api.InvalidUserDataException: Transform output file /home/spoiledgoods/AndroidStudioProjects/Project1/mobile/libs/jcabi-ssh-1.6.1.jar does not exist.
Java 对我来说是一门新语言,以及一般的 Android 开发,但它似乎仍在寻找 .jar 文件,即使源代码中没有使用库本身的任何内容;如果我“到处搜索”(双班次),我会在一个用以下内容jcabi
调用的文件中找到一个实例:Gradle____local_aars____[projectdirectory]_mobile_libs_jcabi_ssh_1_6_1_jar_unspecified_jar.xml
<component name="libraryTable">
<library name="Gradle: __local_aars__:/home/spoiledgoods/AndroidStudioProjects/Project1/mobile/libs/jcabi-ssh-1.6.1.jar:unspecified@jar">
<CLASSES>
<root url="jar://$PROJECT_DIR$/mobile/libs/jcabi-ssh-1.6.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
如有必要,我可以发布整个堆栈跟踪!