Cordova on device image recognition - Android build immediately crashes
Kieran Jan 30, 2018
Hi there, My iOS build has no issue. However my Android runs this error both on the device and on a virtual device. I've tried reinstalling the plugin, changing my cordova version to 7.0.0 (had been running 8.0.0) and removing the cordova android platform numerous times. Any help would be much appreciated!
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.catchoom.test, PID: 15055 java.lang.NullPointerException: Attempt to invoke virtual method 'void com.catchoom.craftar.CraftARPlugin.onCameraOpenFailed()' on a null object reference at com.catchoom.craftar.CraftARCordovaActivity.onCameraOpenFailed(CraftARCordovaActivity.java:77) at com.craftar.CraftARActivity$MyRGBAVideoCaptureConsumer$2.run(CraftARActivity.java:194) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
( Agent )
Jan 31, 2018
In which OS are you running it? Are you running the example project or your own? In what Android device and Android version?
I was successfully able to build the android app using Cordova version 7.1.0 and Android version 6.4.0. However when I start the Android app I'm unable to call CraftARSDK.startFinder(). That function does nothing and I am unable to get the video to start.
This is not the case with iOS which I'm able to get to work perfectly with the same code.
However I need to switch back to Cordova 8 for iOS to work properly.