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:
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:
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.
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... ^^)
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