"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

New project problem

I can run and try ImageTarget project successfully and I can change marker and add my own model correctly. This project run perfect. but now i want to create my own project with different name. I copy the imagatarges project's java classes which are in src folder and also copy res folder for drawables and layouts. Also I add assets folder. After that I create my own xml files and their java classes. After that, i combine them. Also i add the qcar.jar file as referances libiries and jni folder to my project. But when i try to run my project i think that my project does not reach the .cpp classes. Because when start the program my interfaces came but after the some button clicks camera does not open like imagetarget project. How can i solve this problem? (ps:I did ndk build correctly)

AlessandroB

Sun, 03/17/2013 - 20:30

Hi, have you also renamed  the native functions in your CPP code, so to reflect your new package name and class name ?

As an example, consider the function startCamera defined in ImageTargets.cpp:

 

I changed all of code like you said but still some errors are continue. I add logcat error message now. What i do wrong?

 

Ok, the error indeed confirms that it does not find those functions at runtime;

can you copy-paste here these:

- your package name

Our package's name is: org.example.treasurehuntnew
Main class's name name is: ImageTargets.java (we did not change the main class's name)
These are some definitions:

Java_org_example_treasurehuntnew_ImageTargets_getOpenGlEsVersionNative(JNIEnv *, jobject)

The code looks absolutely OK.

Could you try the following:

Build Path -> Configure Build Path -> Order and Export tab ->   check (tick) the QCAR library, then try to build again and run.

 

 

 

Yes, it is clicked but still have the same problems.

When I followed the logcat I saw a sentence like that: CheckJNI is off. Is this make problem? I tried my codes with HTC Sensation and the original project (ImageTargets) will work successfully.

Hi,

the issue might also be related to the module name of your native module;

if you open the Android.mk file (under the JNI dir) you should see a line like:

LOCAL_MODULE := ImageTargets

is it set to "ImageTargets" or something else ?

I changed local module name with project name so my codes dont work and now my project works fine now. Thank you very much for your help. You are the best.