Get Started         Best Practices         Developer Guide         FAQ        
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

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 )
Luis Martinell

Jan 31, 2018

Hi Kieran,

In which OS are you running it? Are you running the example project or your own? In what Android device and Android version?

Thanks!
Luis

0 rated
Kieran

Jan 31, 2018

Hi Luis,

This is our own project that we adapted from the example project.

We're testing using a Nexus 5X with Android 8.0.0.

We've also tried a virtual device using Android Studio running on a Pixel API 25.

Thanks!
0 rated
lucas

Feb 16, 2018

I've encountered the same issue using cordova version 8.0
is there any new information on this topic? I can't seem to find anything
0 rated
( Agent )
Luis Martinell

Feb 19, 2018

Hi,

For now, we recommend to use Cordova 7.0.1 and the cordova android engine 6.4.0.

Best regards.
Luis

0 rated
Kieran Gillen

Apr 20, 2018

HI Luis,

Is this still the current target versions we should be using? It says the current craftAR sdk needs >= 7.1.0 when I try to install using 7.0.1.

-Kieran
0 rated
Kieran Gillen

Apr 20, 2018

I had success with Cordova version 7.1.0 and Android version 6.4.0
0 rated
( Agent )
Luis Martinell

Apr 23, 2018

Hi Kieran,

Sorry for the mistake. The supported version is 7.1.0

Thanks for the feedback!
Luis

0 rated
Kieran

May 01, 2018

HI Luis,

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.

-Kieran
0 rated
Tom

Mar 22, 2019

Was finally able to get this going. Seems like the cordova camera & media-capture plugins were missing.
Add them using cordova plugin add ...
0 rated

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Couldn't find what you were looking for?

support@catchoom.com
https://cdn.desk.com/
false
catchoom
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete