Android的工作室时出错找不到指定的路径 [英] Android studio error cannot find path specified

查看:1411
本文介绍了Android的工作室时出错找不到指定的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了一个登录活动为机器人工作室和安装谷歌播放服务,但是当我运行程序我不断收到以下错误。我认为这64个方法问题,是由于与合并多个DIX文件,但解决没有工作。任何人任何想法?谢谢

 执行任务:[:应用:assembleDebug]与按需配置并行执行是一个孵化功能。
依靠包装来定义主神器的延伸已经去precated,并计划在摇篮2.0被删除
:应用程序:preBuild
:应用:compileDebugNdk
:应用程序:preDebugBuild
:应用:checkDebugManifest
:应用程序:preReleaseBuild
:应用程序:prepareComAndroidSupportAppcompatV71910Library UP-TO-DATE
:应用程序:prepareComGoogleAndroidGmsPlayServices4452Library UP-TO-DATE
:应用程序:prepareDebugDependencies
:应用:compileDebugAidl UP-TO-DATE
:应用:compileDebugRenderscript UP-TO-DATE
:应用:generateDebugBuildConfig UP-TO-DATE
:应用:generateDebugAssets UP-TO-DATE
:应用:mergeDebugAssets UP-TO-DATE
:应用:generateDebugResValues​​ UP-TO-DATE
:应用:generateDebugResources UP-TO-DATE
:应用:mergeDebugResources UP-TO-DATE
:应用:processDebugManifest UP-TO-DATE
:应用:processDebugResources UP-TO-DATE
:应用:generateDebugSources UP-TO-DATE
:应用:compileDebugJava
:应用:dexDebug
未知输出扩展:E:\\ year4 \\ 4thYearProject \\项目code \\列车
用法:
  DX --dex [--debug] [--verbose] [--positions =<风格>] [--no-当地人]
  [--no-优化] [--statistics] [ - [无糖]优化列表= LT;文件>] [--no严格]
  [--keep类] [--output =<文件>] [自卸至= LT;文件>] [自卸宽度=< N>]
  [自卸方法= LT;名称> [*] [--verbose突降] [--no-文件] [--core库]
  [--num线程=< N>] [--incremental] [--force巨无霸]
  [--multi-DEX [ - 主-DEX-列表= LT;文件> [--minimal-主DEX]
  [<文件>的.class | <文件> {拉链,罐子,APK} | <目录>] ...
    转换的一组类文件的成DEX文件,任选嵌入在
    JAR / ZIP。输出名称必须与一个结尾:.dex的.jar的.zip或.apk文件是目录。
    位置选择:无,重要线路。
    --multi-DEX:允许在必要时生成多个文件,DEX。此选项
    独家与--incremental,使--num线程被忽略,只有
    支持文件夹或档案输出。
     - 主-DEX-列表= LT;文件&gt ;:<文件>是类文件名的列表,类定义为
    这些类文件放在classes.dex。
    --minimal-主塞米松:仅由 - 主-DEX-列表中选择类被放在
    主要DEX。
  DX --annotool --annotation =<类别和GT; [--element =<元素类型>]
  [--print =<打印类型>]
  DX --dump [--debug] [--strict] [--bytes] [--optimize]
  [--basic块| --rop块| --ssa块| --dot] [--ssa步=<步骤]的计算值
  [--width =< N>] [<文件>的.class | <文件>的.txt] ...
    转储类文件,或变换其在一个以人为本的格式。
  DX --find,用法和LT; file.dex> <声明类型> <&成员GT;
    查找引用和声明的字段或方法。
    声明类型:内部形式的类的名称,如Ljava /郎/对象;
    成员:字段或方法的名称,如哈希code
  DX -J<选项> ...<参数,在上述形式GT之一;
    传递到运行DX虚拟机VM特定的选项。
  DX --version
    打印工具(1.8)的版本。
  DX --help
    打印此消息。
该系统找不到指定的路径。
该系统找不到指定的路径。
该系统找不到指定的路径。
该系统找不到指定的路径。
该系统找不到指定的路径。 失败故障:建立失败,一个例外。* 什么地方出了错:
执行失败的任务:应用程序:dexDebug。
> com.android.ide.common.internal.LoggedErrorException:无法运行命令:
    C:\\用户\\卡尔\\应用程序数据\\本地\\的Andr​​oid \\ android的工作室\\ SDK \\构建工具\\ 19.1.0 \\ dx.bat --dex --num线程= 4 --multi-DEX --output E: \\ year4 \\ 4thYearProject \\项目code \\火车或放大器;增益\\程序\\编译\\中间体\\ DEX \\调试E:\\ year4 \\ 4thYearProject \\项目code \\火车或放大器;增益\\程序\\编译\\中间体\\类\\调试E:\\ year4 \\ 4thYearProject \\项目code \\火车或放大器;增益\\程序\\编译\\中间体\\依赖缓存\\调试E:\\year4\\4thYearProject\\project$c$c\\Train&Gain\\app\\build\\intermediates\\exploded-aar\\com.google.android.gms\\play-services\\4.4.52\\classes.jar C:\\Users\\carl\\AppData\\Local\\Android\\android-studio\\sdk\\extras\\android\\m2repository\\com\\android\\support\\support-v4\\19.1.0\\support-v4-19.1.0.jar E:\\year4\\4thYearProject\\project$c$c\\Train&Gain\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\19.1.0\\classes.jar
错误code:
    1
输出:
    未知输出扩展:E:\\ year4 \\ 4thYearProject \\项目code \\列车
    用法:
      DX --dex [--debug] [--verbose] [--positions =<风格>] [--no-当地人]
      [--no-优化] [--statistics] [ - [无糖]优化列表= LT;文件>] [--no严格]
      [--keep类] [--output =<文件>] [自卸至= LT;文件>] [自卸宽度=< N>]
      [自卸方法= LT;名称> [*] [--verbose突降] [--no-文件] [--core库]
      [--num线程=< N>] [--incremental] [--force巨无霸]
      [--multi-DEX [ - 主-DEX-列表= LT;文件> [--minimal-主DEX]
      [<文件>的.class | <文件> {拉链,罐子,APK} | <目录>] ...
        转换的一组类文件的成DEX文件,任选嵌入在
        JAR / ZIP。输出名称必须与一个结尾:.dex的.jar的.zip或.apk文件是目录。
        位置选择:无,重要线路。
        --multi-DEX:允许在必要时生成多个文件,DEX。此选项
        独家与--incremental,使--num线程被忽略,只有
        支持文件夹或档案输出。
         - 主-DEX-列表= LT;文件&gt ;:<文件>是类文件名的列表,类定义为
        这些类文件放在classes.dex。
        --minimal-主塞米松:仅由 - 主-DEX-列表中选择类被放在
        主要DEX。
      DX --annotool --annotation =<类别和GT; [--element =<元素类型>]
      [--print =<打印类型>]
      DX --dump [--debug] [--strict] [--bytes] [--optimize]
      [--basic块| --rop块| --ssa块| --dot] [--ssa步=<步骤]的计算值
      [--width =< N>] [<文件>的.class | <文件>的.txt] ...
        转储类文件,或变换其在一个以人为本的格式。
      DX --find,用法和LT; file.dex> <声明类型> <&成员GT;
        查找引用和声明的字段或方法。
        声明类型:内部形式的类的名称,如Ljava /郎/对象;
        成员:字段或方法的名称,如哈希code
      DX -J<选项> ...<参数,在上述形式GT之一;
        传递到运行DX虚拟机VM特定的选项。
      DX --version
        打印工具(1.8)的版本。
      DX --help
        打印此消息。
    该系统找不到指定的路径。
    该系统找不到指定的路径。
    该系统找不到指定的路径。
    该系统找不到指定的路径。
    该系统找不到指定的路径。
*尝试:
与--stacktrace选项获取堆栈跟踪运行。与--info或--debug选项来运行,以获得更多的日志输出。构建失败总时间:1分钟44.126秒


解决方案

提示:检查输出,并试着去理解了什么在这里张贴之前错

是什么错误说:


  

未知输出扩展:E:\\ year4 \\ 4thYearProject \\项目code \\火车


然后在DX命令的输出参数再次看:


  

C:\\用户\\卡尔\\应用程序数据\\本地\\的Andr​​oid \\ android的工作室\\ SDK \\构建工具\\ 19.1.0 \\ dx.bat
  --dex --num线程= 4 --multi-DEX - 输出E:\\ year4 \\ 4thYearProject \\项目code \\火车或放大器;增益\\程序\\编译\\中间体\\ DEX \\调试
  E:\\ year4 \\ 4thYearProject \\项目code \\火车或放大器;增益\\程序\\编译\\中间体\\类\\调试
  E:\\ year4 \\ 4thYearProject \\项目code \\火车或放大器;增益\\程序\\编译\\中间体\\依赖缓存\\调试
  E:\\year4\\4thYearProject\\project$c$c\\Train&Gain\\app\\build\\intermediates\\exploded-aar\\com.google.android.gms\\play-services\\4.4.52\\classes.jar
  C:\\Users\\carl\\AppData\\Local\\Android\\android-studio\\sdk\\extras\\android\\m2repository\\com\\android\\support\\support-v4\\19.1.0\\support-v4-19.1.0.jar
  E:\\year4\\4thYearProject\\project$c$c\\Train&Gain\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\19.1.0\\classes.jar


你现在可以看到[尽可能]错误?它看起来像DX命令在终止'和;'标志。从项目名称中删除它,然后再试一次。

I have added a login activity into android studio and installed google play services but when i run the program i keep getting the following error. I thought it was due to 64 method issue with merging multiple dix files but the solution to that did not work. anyone any ideas?? thanks

Executing tasks: [:app:assembleDebug]

Parallel execution with configuration on demand is an incubating feature.
Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
:app:preBuild
:app:compileDebugNdk
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV71910Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices4452Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava
:app:dexDebug
unknown output extension: E:\year4\4thYearProject\projectCode\Train
usage:
  dx --dex [--debug] [--verbose] [--positions=<style>] [--no-locals]
  [--no-optimize] [--statistics] [--[no-]optimize-list=<file>] [--no-strict]
  [--keep-classes] [--output=<file>] [--dump-to=<file>] [--dump-width=<n>]
  [--dump-method=<name>[*]] [--verbose-dump] [--no-files] [--core-library]
  [--num-threads=<n>] [--incremental] [--force-jumbo]
  [--multi-dex [--main-dex-list=<file> [--minimal-main-dex]]
  [<file>.class | <file>.{zip,jar,apk} | <directory>] ...
    Convert a set of classfiles into a dex file, optionally embedded in a
    jar/zip. Output name must end with one of: .dex .jar .zip .apk or be a directory.
    Positions options: none, important, lines.
    --multi-dex: allows to generate several dex files if needed. This option is 
    exclusive with --incremental, causes --num-threads to be ignored and only
    supports folder or archive output.
    --main-dex-list=<file>: <file> is a list of class file names, classes defined by
    those class files are put in classes.dex.
    --minimal-main-dex: only classes selected by --main-dex-list are to be put in
    the main dex.
  dx --annotool --annotation=<class> [--element=<element types>]
  [--print=<print types>]
  dx --dump [--debug] [--strict] [--bytes] [--optimize]
  [--basic-blocks | --rop-blocks | --ssa-blocks | --dot] [--ssa-step=<step>]
  [--width=<n>] [<file>.class | <file>.txt] ...
    Dump classfiles, or transformations thereof, in a human-oriented format.
  dx --find-usages <file.dex> <declaring type> <member>
    Find references and declarations to a field or method.
    declaring type: a class name in internal form, like Ljava/lang/Object;
    member: a field or method name, like hashCode
  dx -J<option> ... <arguments, in one of the above forms>
    Pass VM-specific options to the virtual machine that runs dx.
  dx --version
    Print the version of this tool (1.8).
  dx --help
    Print this message.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.

 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    C:\Users\carl\AppData\Local\Android\android-studio\sdk\build-tools\19.1.0\dx.bat --dex --num-threads=4 --multi-dex --output E:\year4\4thYearProject\projectCode\Train&Gain\app\build\intermediates\dex\debug E:\year4\4thYearProject\projectCode\Train&Gain\app\build\intermediates\classes\debug E:\year4\4thYearProject\projectCode\Train&Gain\app\build\intermediates\dependency-cache\debug E:\year4\4thYearProject\projectCode\Train&Gain\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\4.4.52\classes.jar C:\Users\carl\AppData\Local\Android\android-studio\sdk\extras\android\m2repository\com\android\support\support-v4\19.1.0\support-v4-19.1.0.jar E:\year4\4thYearProject\projectCode\Train&Gain\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\19.1.0\classes.jar
Error Code:
    1
Output:
    unknown output extension: E:\year4\4thYearProject\projectCode\Train
    usage:
      dx --dex [--debug] [--verbose] [--positions=<style>] [--no-locals]
      [--no-optimize] [--statistics] [--[no-]optimize-list=<file>] [--no-strict]
      [--keep-classes] [--output=<file>] [--dump-to=<file>] [--dump-width=<n>]
      [--dump-method=<name>[*]] [--verbose-dump] [--no-files] [--core-library]
      [--num-threads=<n>] [--incremental] [--force-jumbo]
      [--multi-dex [--main-dex-list=<file> [--minimal-main-dex]]
      [<file>.class | <file>.{zip,jar,apk} | <directory>] ...
        Convert a set of classfiles into a dex file, optionally embedded in a
        jar/zip. Output name must end with one of: .dex .jar .zip .apk or be a directory.
        Positions options: none, important, lines.
        --multi-dex: allows to generate several dex files if needed. This option is 
        exclusive with --incremental, causes --num-threads to be ignored and only
        supports folder or archive output.
        --main-dex-list=<file>: <file> is a list of class file names, classes defined by
        those class files are put in classes.dex.
        --minimal-main-dex: only classes selected by --main-dex-list are to be put in
        the main dex.
      dx --annotool --annotation=<class> [--element=<element types>]
      [--print=<print types>]
      dx --dump [--debug] [--strict] [--bytes] [--optimize]
      [--basic-blocks | --rop-blocks | --ssa-blocks | --dot] [--ssa-step=<step>]
      [--width=<n>] [<file>.class | <file>.txt] ...
        Dump classfiles, or transformations thereof, in a human-oriented format.
      dx --find-usages <file.dex> <declaring type> <member>
        Find references and declarations to a field or method.
        declaring type: a class name in internal form, like Ljava/lang/Object;
        member: a field or method name, like hashCode
      dx -J<option> ... <arguments, in one of the above forms>
        Pass VM-specific options to the virtual machine that runs dx.
      dx --version
        Print the version of this tool (1.8).
      dx --help
        Print this message.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 44.126 secs

解决方案

Tip: Check the output and try to understand what went wrong before posting it here.

Look what the error says:

unknown output extension: E:\year4\4thYearProject\projectCode\Train

And then look once again on the dx command's output parameter:

C:\Users\carl\AppData\Local\Android\android-studio\sdk\build-tools\19.1.0\dx.bat --dex --num-threads=4 --multi-dex --output E:\year4\4thYearProject\projectCode\Train&Gain\app\build\intermediates\dex\debug E:\year4\4thYearProject\projectCode\Train&Gain\app\build\intermediates\classes\debug E:\year4\4thYearProject\projectCode\Train&Gain\app\build\intermediates\dependency-cache\debug E:\year4\4thYearProject\projectCode\Train&Gain\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\4.4.52\classes.jar C:\Users\carl\AppData\Local\Android\android-studio\sdk\extras\android\m2repository\com\android\support\support-v4\19.1.0\support-v4-19.1.0.jar E:\year4\4thYearProject\projectCode\Train&Gain\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\19.1.0\classes.jar

Can you see the [possible] error now? It looks like the dx command terminates at '&' sign. Remove it from your project name and try again.

这篇关于Android的工作室时出错找不到指定的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆