Android工具内部出错:检查控制台

时间:2014-07-07 09:34:02

标签: android windows processing

我使用Windows 7,处理2.2.1。代码即

void setup(){
  size(300,300);
}
void draw(){
  fill(255,0,0);
  rect(mouseX,mouseY,40,40);
}

在java模式下工作正常,但在Android模式下会出现以下描述的错误。请帮我解决这个问题,我是处理新手。 这是我得到的错误:

[taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.

-set-mode-check:

-set-debug-files:

-check-env:
Android SDK Tools Revision 23.0.0
Installed at C:\Users\Simmu\AppData\Local\Android\android-sdk

-setup:
     [echo] Project Name: sketch_140704a
Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
Using latest Build Tools: 20.0.0
     [echo] Resolving Build Target for sketch_140704a...
Project Target:   Android 2.3.3
API level:        10
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\bin
    [mkdir] Created dir: C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\bin\res
    [mkdir] Created dir: C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\bin\rsObj
    [mkdir] Created dir: C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\bin\rsLibs
    [mkdir] Created dir: C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\gen
    [mkdir] Created dir: C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\bin\classes
    [mkdir] Created dir: C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\bin\dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for sketch_140704a...
Library dependencies:
No Libraries

------------------
API<=15: Adding annotations.jar to the classpath.
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
Merging AndroidManifest files into one.
Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 3 source files to C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\bin\classes

-post-compile:

-obfuscate:

-dex:
input: C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\bin\classes
input: C:\Users\Simmu\AppData\Local\Android\android-sdk\tools\support\annotations.jar
input: C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\libs\processing-core.jar
Pre-Dexing C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\libs\processing-core.jar -> processing-core-772a27754f9c5e0f1acc71d5ba1d4960.jar
Converting compiled files and external libraries into C:\Users\Simmu\AppData\Local\Temp\android1550940716866401979sketch\bin\classes.dex...
       [dx] 
       [dx] UNEXPECTED TOP-LEVEL EXCEPTION:
       [dx] java.io.FileNotFoundException: C:\Users\Simmu\AppData\Local\Android\android-sdk\tools\support\annotations.jar (The system cannot find the file specified)
       [dx]     at java.util.zip.ZipFile.open(Native Method)
       [dx]     at java.util.zip.ZipFile.<init>(Unknown Source)
       [dx]     at java.util.zip.ZipFile.<init>(Unknown Source)
       [dx]     at java.util.zip.ZipFile.<init>(Unknown Source)
       [dx]     at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
       [dx]     at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
       [dx]     at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
       [dx]     at com.android.dx.command.dexer.Main.processOne(Main.java:596)
       [dx]     at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
       [dx]     at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
       [dx]     at com.android.dx.command.dexer.Main.run(Main.java:230)
       [dx]     at com.android.dx.command.dexer.Main.main(Main.java:199)
       [dx]     at com.android.dx.command.Main.main(Main.java:103)
       [dx] 1 error; aborting

BUILD FAILED
C:\Users\Simmu\AppData\Local\Android\android-sdk\tools\ant\build.xml:892: The following error occurred while executing this line:
C:\Users\Simmu\AppData\Local\Android\android-sdk\tools\ant\build.xml:894: The following error occurred while executing this line:
C:\Users\Simmu\AppData\Local\Android\android-sdk\tools\ant\build.xml:906: The following error occurred while executing this line:
C:\Users\Simmu\AppData\Local\Android\android-sdk\tools\ant\build.xml:283: null returned: 1

Total time: 33 seconds

1 个答案:

答案 0 :(得分:0)

看起来您的工具文件夹未更新。您可以执行以下命令来更新它。

android.bat update sdk -u -a -t 1,2

上面的android命令位于你的/ tools /文件夹中。或者你可以使用你的sdk文件夹中的SDK Manager并更新/安装工具 - &gt; Android sdk工具,Android sdk平台工具,还可以从extras更新/安装android支持库

这应该解决它