我已将登录活动添加到android studio中,并安装了Google Play服务,但是当我运行该程序时,我一直收到以下错误消息。我认为这是由于合并多个Dix文件导致的64方法问题,但该解决方案无效。任何人有任何想法吗?谢谢
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
提示:在将输出发布到此处之前,请检查输出并尝试了解出了什么问题。
看看错误说了什么:
未知的输出扩展名:E:\ year4 \ 4thYearProject \ projectCode \ Train
然后再次查看dx命令的输出参数:
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
您现在可以看到[可能]错误吗?看起来dx命令以'&'符号终止。从您的项目名称中将其删除,然后重试。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句