codeanticode / processing-cardboard Goto Github PK
View Code? Open in Web Editor NEWCardboard library for the Android mode in Processing
Cardboard library for the Android mode in Processing
I've recently installed version 0.6 of the cardboard library on Processing 3.2.3 and tried the Cube and Mono examples, but both crash with a similar error message:
FATAL EXCEPTION: GLThread 4913
Process: processing.test.mono, PID: 13489
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/vrtoolkit/cardboard/Viewport;
at processing.cardboard.PGraphicsCardboard.beginDraw(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGLES$AndroidRenderer.onDrawFrame(Unknown Source)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1548)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1259)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.vrtoolkit.cardboard.Viewport" on path: DexPathList[[zip file "/data/app/processing.test.mono-2/base.apk"],nativeLibraryDirectories=[/data/app/processing.test.mono-2/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 5 more
this error is on Android 7.1 (on a Google Pixel device).
Here's is a similar error with a few more details on Android 5.1.1 (on a Xperia Z device):
OpenGL error 1280 at bot beginDraw(): invalid enum
OpenGL error 1280 at bot beginDraw(): invalid enum
OpenGL error 1280 at bot beginDraw(): invalid enum
FATAL EXCEPTION: GLThread 891
Process: processing.test.mono, PID: 11185
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/vrtoolkit/cardboard/Viewport;
at processing.cardboard.PGraphicsCardboard.beginDraw(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGLES$AndroidRenderer.onDrawFrame(Unknown Source)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.vrtoolkit.cardboard.Viewport" on path: DexPathList[[zip file "/data/app/processing.test.mono-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
FATAL EXCEPTION: GLThread 891
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
Process: processing.test.mono, PID: 11185
FATAL EXCEPTION: GLThread 891
... 5 more
Process: processing.test.mono, PID: 11185
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/vrtoolkit/cardboard/Viewport;
at processing.cardboard.PGraphicsCardboard.beginDraw(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGLES$AndroidRenderer.onDrawFrame(Unknown Source)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.vrtoolkit.cardboard.Viewport" on path: DexPathList[[zip file "/data/app/processing.test.mono-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/vrtoolkit/cardboard/Viewport;
... 5 more
Suppressed: java.lang.ClassNotFoundException: com.google.vrtoolkit.cardboard.Viewport
Suppressed: java.lang.ClassNotFoundException: com.google.vrtoolkit.cardboard.Viewport
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 6 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
at processing.cardboard.PGraphicsCardboard.beginDraw(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at java.lang.Class.classForName(Native Method)
at processing.opengl.PGLES$AndroidRenderer.onDrawFrame(Unknown Source)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 6 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.vrtoolkit.cardboard.Viewport" on path: DexPathList[[zip file "/data/app/processing.test.mono-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
... 5 more
Suppressed: java.lang.ClassNotFoundException: com.google.vrtoolkit.cardboard.Viewport
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 6 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available```
Any hints on what I might be missing ?
@codeanticode : Kindly help me with this issue.
OS: Windows 10
Processing: 3.1.2 Android Mode: 4.0-beta2
Downloaded the zipped repository and unpacked it. Copied the folder as 'processing-cardboard' and copied it into libraries folder for Processing. Even after restart of Processing, unable to import the library.
Other manual library installations are recognized.
Tried renaming the folder to 'cardboard' as well. Same issue persists.
Following is the screenshot from Processing IDE:
Its not really an issue, Everything is working great. Just wanted to know how the camera postition. From trial and error I found its around (0,0,600). Just wanted the actual number for a code I am writing.
I think you place a camera in the source library. What is the value of cameraZ?
camera(0.0f, 0.0f, cameraZ, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f);
Anyway thanks for this library its amazing ๐ ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.