I am new to processing for android. There is obviously a lot of stuff wrong with my sketch but I can’t figure out what the error messages mean. It would mean the world to me if anyone could help. Heres the errors AndroidDevice: cannot find process id, console output will be disabled. AndroidDevice: cannot find process id, console output will be disabled. AndroidDevice: cannot find process id, console output will be disabled. FATAL EXCEPTION: Animation Thread Process: processing.test.avoidaliens_v3_00_touch_beta_1, PID: 16944 java.lang.IllegalArgumentException: File /pictures/plane.png contains a path separator at android.app.ContextImpl.makeFilename(ContextImpl.java:2882) at android.app.ContextImpl.openFileInput(ContextImpl.java:623) at android.content.ContextWrapper.openFileInput(ContextWrapper.java:202) at processing.core.PSurfaceNone.openFileInput(PSurfaceNone.java:331) at processing.core.PApplet.createInputRaw(PApplet.java:5116) at processing.core.PApplet.createInput(PApplet.java:4924) at processing.core.PApplet.loadImage(PApplet.java:4019) at processing.test.avoidaliens_v3_00_touch_beta_1.AvoidAliens_V3_00_TOUCH_BETA_1.setup(AvoidAliens_V3_00_TOUCH_BETA_1.java:149) at processing.core.PApplet.handleDraw(PApplet.java:1838) at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:476) at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:516)
I fixed the first lines by removing the folder paths. The message now says
Could not load the image because the bitmap was empty.
FATAL EXCEPTION: Animation Thread
Process: processing.test.avoidaliens_v3_00_touch_beta_1, PID: 17740
java.lang.NullPointerException: Attempt to read from field 'int processing.core.PImage.width' on a null object reference
at processing.core.PGraphics.image(PGraphics.java:2931)
at processing.core.PApplet.image(PApplet.java:8747)
at processing.test.avoidaliens_v3_00_touch_beta_1.AvoidAliens_V3_00_TOUCH_BETA_1.draw(AvoidAliens_V3_00_TOUCH_BETA_1.java:213)
at processing.core.PApplet.handleDraw(PApplet.java:1855)
at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:476)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:516)
It is just not possible to help if you don’t show some code to reproduce the problem. This ill also show the approach you are taking.
- Is the file a valid file?
- Is it in the right location?
- Can you run a simple android sample code as described in the Processing Android site? In other words, if your Processing Android properly configured?
Kf
@Banansplitt===
first error is simple to explain: a path (something like folder1/folder2/myImage.jpg) is NOT a correct file name…Second one can be fired by 2 or 3 reasons (you forgot to create an instance for your img var, your image is not in the data folder, its name is not the good one…) but without seeing your code and knowing where is the image it is impossible to conclude…