gpt4 book ai didi

android - 系统找不到android studio中指定的文件?

转载 作者:太空狗 更新时间:2023-10-29 16:31:33 26 4
gpt4 key购买 nike

我正在尝试在 Android Studio 2.0 中创建一个新的示例应用程序。当我尝试运行或调试时,它会显示编译时错误,例如,

任务 ':app:compileDebugJavaWithJavac' 执行失败。

java.io.FileNotFoundException: D:\Android Studio\newapp\app\libs\core.jar (The system cannot find the file specified)

我曾尝试提供路径 JAVA_HOME C:\Program Files\Java\jdk1.7.0_45 和将项目与 gradle 同步。

这是我的 Gradle

安卓{ 编译SDK版本23 buildTools版本“23.0.1” useLibrary 'org.apache.http.legacy'...

依赖关系{

compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'

compile 'com.android.support:appcompat-v7:23.0.1-alpha2'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.2.0'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.0.1'

compile 'org.apache.httpcomponents:httpclient:4.5'

compile 'com.google.android.gms:play-services:+'

compile 'org.apache.httpcomponents:httpclient:4.2.6'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile files('libs/core.jar')

即使在那之后我也找不到任何解决方案。

提前谢谢你

最佳答案

libs\core.jar (The system cannot find the file specified)

对我来说似乎是一个明显的错误......

删除此行。你不需要它

compile files('libs/core.jar')

可以core.jar 文件添加到libs 文件夹中,但是您仍然不需要该行,因为您已经在编译它了

另外,请只选择一个版本。您不需要多次添加它们

compile 'com.android.support:appcompat-v7:23.0.1-alpha2'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:appcompat-v7:23.2.0'

这些都一样

compile 'com.android.support:design:23.2.0'
compile 'com.android.support:design:23.0.1'

关于android - 系统找不到android studio中指定的文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37050758/

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