【问题标题】:The system cannot find the file specified in android studio?系统找不到android studio中指定的文件?
【发布时间】:2016-05-05 12:34:29
【问题描述】:

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

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

java.io.FileNotFoundException: D:\Android Studio\newapp\app\libs\core.jar(系统找不到指定的文件)

我曾尝试通过给出路径 JAVA_HOME C:\Program Files\Java\jdk1.7.0_45 和 用 gradle 同步项目。

这是我的摇篮

机器人{ compileSdkVersion 23 构建工具版本“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')

}

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

提前谢谢你

【问题讨论】:

    标签: android


    【解决方案1】:

    libs\core.jar(系统找不到指定的文件)

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

    删除此行。你不需要它

    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'
    

    【讨论】:

    • 我在哪里可以删除它?
    • 您的问题中只显示了一个文件,那么您认为呢?
    猜你喜欢
    • 1970-01-01
    • 2013-11-21
    • 1970-01-01
    • 1970-01-01
    • 2019-11-21
    • 2017-06-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多