我是处理新手,希望使用处理制作应用, 但是我无法在ubuntu中的android模式下运行基本代码
我尝试找到解决方案,但我只能找到它的窗口,
我已安装java版本1.8
请帮助,我们将非常感激
我遇到的错误是,
1. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/MainActivity.java (at line 11)
import android.support.v4.content.ContextCompat;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import android.support.v4.content.ContextCompat is never used
----------
2. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/MainActivity.java (at line 15)
import android.Manifest;
^^^^^^^^^^^^^^^^
The import android.Manifest is never used
----------
3. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/MainActivity.java (at line 49)
int check;
^^^^^
The value of the local variable check is not used
----------
----------
4. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 4)
import processing.data.*;
^^^^^^^^^^^^^^^
The import processing.data is never used
----------
5. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 5)
import processing.event.*;
^^^^^^^^^^^^^^^^
The import processing.event is never used
----------
6. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 6)
import processing.opengl.*;
^^^^^^^^^^^^^^^^^
The import processing.opengl is never used
----------
7. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 8)
import java.util.HashMap;
^^^^^^^^^^^^^^^^^
The import java.util.HashMap is never used
----------
8. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 9)
import java.util.ArrayList;
^^^^^^^^^^^^^^^^^^^
The import java.util.ArrayList is never used
----------
9. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 10)
import java.io.File;
^^^^^^^^^^^^
The import java.io.File is never used
----------
10. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 11)
import java.io.BufferedReader;
^^^^^^^^^^^^^^^^^^^^^^
The import java.io.BufferedReader is never used
----------
11. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 12)
import java.io.PrintWriter;
^^^^^^^^^^^^^^^^^^^
The import java.io.PrintWriter is never used
----------
12. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 13)
import java.io.InputStream;
^^^^^^^^^^^^^^^^^^^
The import java.io.InputStream is never used
----------
13. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 14)
import java.io.OutputStream;
^^^^^^^^^^^^^^^^^^^^
The import java.io.OutputStream is never used
----------
14. WARNING in /tmp/android5161046717281048963sketch/src/processing/test/sa/sa.java (at line 15)
import java.io.IOException;
^^^^^^^^^^^^^^^^^^^
The import java.io.IOException is never used
----------
14 problems (14 warnings)
-post-compile:
-obfuscate:
-dex:
input: /tmp/android5161046717281048963sketch/bin/classes
input: /tmp/android5161046717281048963sketch/libs/android-support-v4.jar
input: /tmp/android5161046717281048963sketch/libs/processing-core.jar
Pre-Dexing /tmp/android5161046717281048963sketch/libs/android-support-v4.jar -> android-support-v4-4a45b30e6f029e45cd804738867ce484.jar
Pre-Dexing /tmp/android5161046717281048963sketch/libs/processing-core.jar -> processing-core-e5aa8bee33bb8c16a67b91c03a0cc33a.jar
Converting compiled files and external libraries into /tmp/android5161046717281048963sketch/bin/classes.dex...
[dx] Merged dex #1 (9 defs/5.7KiB)
[dx] Merged dex #2 (1153 defs/1127.0KiB)
[dx] Merged dex #3 (171 defs/703.5KiB)
[dx] Result is 1333 defs/2250.4KiB. Took 0.6s
-crunch:
[crunch] Crunching PNG Files in source dir: /tmp/android5161046717281048963sketch/res
[crunch] To destination dir: /tmp/android5161046717281048963sketch/bin/res
[crunch] Processing image to cache: /tmp/android5161046717281048963sketch/res/drawable-hdpi/icon.png => /tmp/android5161046717281048963sketch/bin/res/drawable-hdpi/icon.png
[crunch] (processed image to cache entry /tmp/android5161046717281048963sketch/bin/res/drawable-hdpi/icon.png: 52% size of source)
[crunch] Processing image to cache: /tmp/android5161046717281048963sketch/res/drawable-ldpi/icon.png => /tmp/android5161046717281048963sketch/bin/res/drawable-ldpi/icon.png
[crunch] (processed image to cache entry /tmp/android5161046717281048963sketch/bin/res/drawable-ldpi/icon.png: 0% size of source)
[crunch] Processing image to cache: /tmp/android5161046717281048963sketch/res/drawable-xhdpi/icon.png => /tmp/android5161046717281048963sketch/bin/res/drawable-xhdpi/icon.png
[crunch] (processed image to cache entry /tmp/android5161046717281048963sketch/bin/res/drawable-xhdpi/icon.png: 74% size of source)
[crunch] Processing image to cache: /tmp/android5161046717281048963sketch/res/drawable-xxhdpi/icon.png => /tmp/android5161046717281048963sketch/bin/res/drawable-xxhdpi/icon.png
[crunch] (processed image to cache entry /tmp/android5161046717281048963sketch/bin/res/drawable-xxhdpi/icon.png: 89% size of source)
[crunch] Processing image to cache: /tmp/android5161046717281048963sketch/res/drawable-xxxhdpi/icon.png => /tmp/android5161046717281048963sketch/bin/res/drawable-xxxhdpi/icon.png
[crunch] (processed image to cache entry /tmp/android5161046717281048963sketch/bin/res/drawable-xxxhdpi/icon.png: 89% size of source)
[crunch] Processing image to cache: /tmp/android5161046717281048963sketch/res/drawable/icon.png => /tmp/android5161046717281048963sketch/bin/res/drawable/icon.png
[crunch] (processed image to cache entry /tmp/android5161046717281048963sketch/bin/res/drawable/icon.png: 84% size of source)
[crunch] Crunched 6 PNG files to update cache
-package-resources:
Creating full resource package...
-package:
Current build type is different than previous build: forced apkbuilder run.
Creating sa-debug-unaligned.apk and signing it with a debug key...
BUILD FAILED
/home/satinder/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:958: The following error occurred while executing this line:
/home/satinder/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:969: The following error occurred while executing this line:
/home/satinder/sketchbook/modes/AndroidMode/sdk/tools/ant/build.xml:312: com.android.sdklib.build.ApkCreationException: Failed to create key: Cannot run program "/home/satinder/Downloads/processing-3.3.5/java/bin/keytool": error=2, No such file or directory
JAVA_HOME is set to: /home/satinder/Downloads/processing-3.3.5/java
Update it if necessary, or manually execute the following command:
/home/satinder/Downloads/processing-3.3.5/java/bin/keytool -genkey -alias AndroidDebugKey -keyalg RSA -dname "CN=Android Debug,O=Android,C=US" -validity 10950 -keypass android -keystore /home/satinder/.android/debug.keystore -storepass android
at com.android.sdklib.build.ApkBuilder.getDebugKey(ApkBuilder.java:300)
at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:392)
at com.android.ant.ApkBuilderTask.execute(ApkBuilderTask.java:334)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java:124)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java:124)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at processing.mode.android.AndroidBuild.antBuild(AndroidBuild.java:525)
at processing.mode.android.AndroidBuild.build(AndroidBuild.java:96)
at processing.mode.android.AndroidMode.handleRunEmulator(AndroidMode.java:259)
at processing.mode.android.AndroidEditor$15.run(AndroidEditor.java:511)
Total time: 23 seconds