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

CraftAR won't build to Android, but works for iOS

Evan Jul 16, 2015

Hi,

I've been developing an app that uses the CraftAR library for image recognition only. The app will build and run on iOS, but fails to build to android. This is the full list of errors:

:compileDebugJava/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARCordovaActivity.java:7: error: cannot find symbol
import org.apache.cordova.CordovaChromeClient;
^
symbol: class CordovaChromeClient
location: package org.apache.cordova
/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARCordovaActivity.java:11: error: cannot find symbol
import org.apache.cordova.CordovaWebViewClient;
^
symbol: class CordovaWebViewClient
location: package org.apache.cordova
/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARCordovaActivity.java:12: error: cannot find symbol
import org.apache.cordova.IceCreamCordovaWebViewClient;
^
symbol: class IceCreamCordovaWebViewClient
location: package org.apache.cordova
/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARCordovaActivity.java:24: error: package com.craftar does not exist
import com.craftar.CraftARActivity;
^
/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARCordovaActivity.java:25: error: package com.craftar does not exist
import com.craftar.CraftARCamera;
^
/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARCordovaActivity.java:26: error: package com.craftar does not exist
import com.craftar.CraftARCameraView;
^
/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARCordovaActivity.java:27: error: package com.craftar does not exist
import com.craftar.CraftARCloudRecognition;
^
/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARCordovaActivity.java:28: error: package com.craftar does not exist
import com.craftar.CraftARSDK;
^
/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARCordovaActivity.java:29: error: package com.craftar does not exist
import com.craftar.CraftARTracking;
^
/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARCordovaActivity.java:31: error: cannot find symbol
public class CraftARCordovaActivity extends CraftARActivity implements CordovaInterface {
^
symbol: class CraftARActivity
/Users/evanchurchill/projects/iostest/platforms/android/src/com/catchoom/craftar/CraftARJSInterface.java:16: error: package com.craftar does not exist
import com.craftar.CraftARItem;

There are more errors in the output, but since this form limits me to a 5kb post, thats all I can fit.

From what I can see, it isn't able to actually find the library files, which I added as per the getting started guide. Any help would be greatly appreciated.

Thanks,
Evan


Evan

Jul 17, 2015

Its me, same person who asked

I've also followed all the steps outlined here http://support.catchoom.com/customer/portal/questions/11510851-android-studio

which for the record are not the same ones offered in the official documentation.
1 rated
( Agent )
Miquel Ferrarons

Jul 17, 2015

Looks like you haven’t imported the android libraries. You have to download them from here http://catchoom.com/product/craftar/augmented-reality-and-image-recognition-sdk/#download-mobile-sdk (Android Augmented Reality SDK). Then, extract the SDK and copy the contents of libs into platforms/android/libs in your project.

Check all the steps in the README of our repository in github for the Cordova plugin: https://github.com/Catchoom/craftar-phonegap#craftar-phonegap

0 rated
Evan

Jul 17, 2015

Hi Miquel,

I have added the SDK into the libs folder of the android platform root directory, and they are listed as library dependencies in the module manager in android studio. I've done all this prior to asking the question. I'm still getting the same errors. Are both the augmented reality SDK and the image recognition SDK required to use just the image recognition library? this was not the case with the iOS SDK, as I've only got the IR SDK added to that platform, and it works fine.
0 rated
( Agent )
Miquel Ferrarons

Jul 20, 2015

Hi Evan,

The Cordova plugin is intented to be used with the Augmented Reality SDK. Note that the Augmented Reality SDK has all the features of the Image Recognition SDK, plus some others. You will use only the Augmented Reality SDK, not both.

0 rated
Cynan Rhodes

Sep 13, 2015

These errors are related to the version of Cordova being used - unfortunately the CraftAR plugin is out of date and doesn't support the latest version.

I rolled back to the previous Cordova version my app was using (3.5.1) (see http://forum.ionicframework.com/t/downgrade-to-cordova-3-5-1/12652) and then the app built successfully again.





1 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