2014-09-26 63 views
0

當我運行任何應用程序時,即使它在屏幕上顯示「Hello world」的基本程序也不起作用。有人能幫我弄清楚這一切意味着什麼>。>謝謝你。這發生在我的電腦上,一個朋友的電腦,它只是沒運行,我剛重新安裝機器人工作室(但不是Java的JDK) 當我運行任何應用程序時,該程序給我一個錯誤

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 UP-TO-DATE 
 
:app:preDebugBuild 
 
:app:checkDebugManifest 
 
:app:preReleaseBuild 
 
:app:prepareComAndroidSupportAppcompatV72000Library UP-TO-DATE 
 
:app:prepareComAndroidSupportSupportV42000Library 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 
 
:app:processDebugManifest UP-TO-DATE 
 
:app:processDebugResources 
 
:app:generateDebugSources 
 
:app:compileDebugJava UP-TO-DATE 
 
:app:preDexDebug 
 
unknown output extension: C:\Users\Rick\Documents\Spellbook\SpellbookD 
 
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>] 
 
unknown output extension: C:\Users\Rick\Documents\Spellbook\SpellbookD 
 
usage: 
 
dx --dex [--debug] [--verbose] [--positions=<style>] [--no-locals] 
 
[--no-optimize] [--statistics] [--[no-]optimize-list=<file>] [--no-strict] 
 
[--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. 
 
[--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. 
 

 
FAILED 
 
FAILURE: Build failed with an exception. 
 
* What went wrong: 
 
Execution failed for task ':app:preDexDebug'. 
 
> com.android.ide.common.internal.LoggedErrorException: Failed to run command: 
 
C:\Users\Rick\AppData\Local\Android\android-studio1\sdk\build-tools\android-4.4W\dx.bat --dex --output C:\Users\Rick\Documents\Spellbook\SpellbookD&D5th\app\build\intermediates\pre-dexed\debug\support-annotations-20.0.0-0d853c27bd4d6b62d50991a94f330ee92c9660ea.jar C:\Users\Rick\AppData\Local\Android\android-studio1\sdk\extras\android\m2repository\com\android\support\support-annotations\20.0.0\support-annotations-20.0.0.jar 
 
Error Code: 
 
1 
 
Output: 
 
unknown output extension: C:\Users\Rick\Documents\Spellbook\SpellbookD 
 
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. 
 
* 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: 23.0 secs 
 
Executing tasks: [:app:assembleDebug] 
 
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 UP-TO-DATE 
 
:app:preDebugBuild 
 
:app:checkDebugManifest 
 
:app:preReleaseBuild 
 
:app:prepareComAndroidSupportAppcompatV72000Library UP-TO-DATE 
 
:app:prepareComAndroidSupportSupportV42000Library 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 
 
:app:processDebugManifest UP-TO-DATE 
 
:app:processDebugResources 
 
:app:generateDebugSources 
 
:app:compileDebugJava 
 
:app:preDexDebug 
 
unknown output extension: C:\Users\Rick\Documents\Spellbook\SpellbookD 
 
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 
 
unknown output extension: C:\Users\Rick\Documents\Spellbook\SpellbookD 
 
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. 
 
Print this message. 
 
The system cannot find the path specified. 
 
The system cannot find the path specified. 
 
FAILED 
 
The system cannot find the path specified. 
 
FAILURE: Build failed with an exception. 
 
* What went wrong: 
 
Execution failed for task ':app:preDexDebug'. 
 
> com.android.ide.common.internal.LoggedErrorException: Failed to run command: 
 
C:\Users\Rick\AppData\Local\Android\android-studio1\sdk\build-tools\android-4.4W\dx.bat --dex --output C:\Users\Rick\Documents\Spellbook\SpellbookD&D5th\app\build\intermediates\pre-dexed\debug\classes-cb3d2cfea94b9f5266afe2f7149823e33a7f9188.jar C:\Users\Rick\Documents\Spellbook\SpellbookD&D5th\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\20.0.0\classes.jar 
 
Error Code: 
 
1 
 
Output: 
 
unknown output extension: C:\Users\Rick\Documents\Spellbook\SpellbookD 
 
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. 
 
* Try: 
 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 
 
BUILD FAILED

+0

構建工具版本? SDK版本? Gradle版本? Gradle構建腳本?任何相關的代碼? – 2014-09-26 01:07:59

+0

我在我的電腦上使用模擬器。 – Kyser 2014-09-26 01:34:54

回答

0

檢查SDK路徑和項目的其他屬性屬性菜單。

SDK路徑應該正確給出。

如果你最近做過升級,它可能也會產生影響。檢查一次。

並檢查res文件一次。如果有任何錯誤,構建不成功。

如果一切正常,然後清理項目。並再次運行

+0

我確實已經像安裝說明一樣在JDK中創建了一個路徑,可以幫助我如何檢查sdk路徑和res文件。 – Kyser 2014-09-27 17:49:12

相關問題