Log in or register to post comments

Sample app failing to build in Android Studio

May 19, 2015 - 12:31pm #1

Hi,

I'm trying to build the sample Android Vuforia 4.2.3 app in Android Studio.  I've followed the quick start guide, and I have hit this wall:  Java can't seem to find the subclasses of vuforia.  Like:

/Users/zacharylucas/StudioProjects/VuforiaSamples-4-2-3/app/src/main/java/com/qualcomm/vuforia/samples/SampleApplication/SampleApplicationControl.java:10: error: cannot find symbol
import com.qualcomm.vuforia.State;
                           ^
  symbol:   class State
  location: package com.qualcomm.vuforia
 
Any ideas?  Thanks!

Sample app failing to build in Android Studio

April 30, 2018 - 4:51am #9

 i dont have vuforia.jar in my project what should i do

Sample app failing to build in Android Studio

February 12, 2018 - 3:34am #8

thanks

Sample app failing to build in Android Studio

February 12, 2018 - 3:34am #7

thanks

Sample app failing to build in Android Studio

February 12, 2017 - 5:06am #6

jensquast working, thank you mate.

Sample app failing to build in Android Studio

January 5, 2017 - 2:52am #5

This is the correct Answer.

Thank you so much you save my time.

Sample app failing to build in Android Studio

June 15, 2016 - 3:54pm #4

Had the same problem, here's a solution that worked for me.

(Seems like the project needs access to the Vuforia.jar file and can't access it outside of the sample folder(?))

So,

1. copy the Vuforia.jar file from the folder \vuforia-sdk-android-x-x-x\build\java\vuforia to a folder in the sample project, e.g. to \samples\app\libs
(it's important it's in the "\app" path, so you can find it in the next step)

2. in Android SDK hit F4 (or right click on the app folder in the project structure and click on "Open Module Settings".
Select the tab "dependencies", click on the "+" to add a dependency and select "2 File dependency".
Now select the above path and file ((\samples\app\) \libs\Vuforia.jar) and the project will run just fine...

Good luck,

Jens

 

P.S. the first error that came up and took me down this road was "cannot find symbol class state"...

(how annoying that things like these never seem to work out of the box... ^^)

 

Sample app failing to build in Android Studio

May 26, 2015 - 1:46am #3

Android Studio have a new version, and the Import Wizard dialog does not open any message: "alternatively, you can fill in the actual path map in the table below". I did exactly the same steps that 2 months ago, but they are not the same!

 

EDIT: Finally it works. I follow the steps bellow (similar to https://developer.vuforia.com/forum/android/using-android-studio-vuforia ):

- Copy the file <SDK_INSTALL>/build/java/vuforia/Vuforia.jar to <Sample_Project>/libs 

- The file build.gradle must show as:

dependencies {

compile fileTree(dir:'libs', include: '*.jar')

}

- Create the folder 'main' in 'src' directory (if it does not exist)

- Create the folder 'jniLibs' in the 'main' folder

- Copy the '<SDK_INSTALL>/build/lib/armeabi-v7a folder to 'jniLibs' folder.

- Clean and build

 

The difference is that te .jar file is other location.

Sample app failing to build in Android Studio

May 21, 2015 - 5:26pm #2

Is the Vuforia.jar setup as a Library in the project? See these steps for more details:

https://developer.vuforia.com/forum/android/using-android-studio-vuforia

 

Log in or register to post comments