Log in or register to post comments

Developing new Application

February 2, 2011 - 1:47am #1

Hi

I want to make new application with the help of ImageTargets sample..Iam quiet new to jni and all.....So copied the make file exactly and made the required chages like in mentioning the src files(c/c++) changing the module name,etc...I also copied my project into the sample folder only so that there are no conflicts with the path...I also copied the .externalFolder into my app and made changes copyQCARLib.bat and .sh file to change the application name to my app name instead of ImageTargets...Although I dont know what is the use of this .externalFolder.Please forgive me as Iam a fresher:p..But keen to learn all this...

Iam working on windows environment.....

The problem is when i do ndk-build of my application,libs folder is created and myapp.so is copied into it but QCARLib.so is not copied.Dont know why...
:(.Where as in other samples both .so files are created with ndk build.Also gdbsetup and gdbserver are not created.Dont know their purpose also....

Then if i ignore this and import the project in eclipse following procedure given for other samples and run it...Iam getting exception java.lang.UnSatisfiedError because i guess its not able to load the libraries...

I know Iam missing something....But cant figure out...Please help its a bit urgent as i have already spent 3 days in this.....

Re: Developing new Application

May 5, 2011 - 11:29am #7

Start with the Getting Started guide on the SDK main page: http://ar.qualcomm.com

That will help you setup your build environment and walk you through steps like running ndk-build to compile the shared objects. On Windows, you run the "ndk-build" command in cygwin in the project directory. This is part of Android NDK development.

- Kim

Re: Developing new Application

May 5, 2011 - 11:00am #6
ppreuss wrote:

Remember, any saved changes to ImageTargets.cpp require a rebuild using cygwin and the ndk-build command.

Hi... I'm sorry... my english is very bad...

1. How I can do the ndk-build command.

2. There is another guide for developing something step by step? or any tutorials that you recommend me...

Thanks.

Re: Developing new Application

May 4, 2011 - 6:16pm #5

The comments in the ImageTargets source code are a good starting point after running the ImageTargets sample app. The Application is commented in such a way that it should take only a little work to modify the code for your purpose. ImageTargets.java and ImageTargets.cpp are good places to start looking around. Remember, any saved changes to ImageTargets.cpp require a rebuild using cygwin and the ndk-build command.

Re: Developing new Application

May 4, 2011 - 2:16pm #4

Hi All,

Just passing the Getting Started manual, and come to developing a new application base on ImageTargets.

Any article or explanation for the code of this sample? Kind of a tutorial would be great!

Still a NEWB.

Thanks

Re: Developing new Application

February 3, 2011 - 9:27pm #3

Hi Kim

Thanks its working perfect now. :)

Re: Developing new Application

February 2, 2011 - 5:34am #2

It sounds like you're close, you've just missed the Eclipse builder that copies libQCAR.so to your project's libs folders. You see, ndk-build only builds your application-specific shared library (e.g. libImageTargets.so for the ImageTargets sample) and wipes out any other libraries in the libs folders. That's why in Eclipse we need a separate build step to copy libQCAR.so back in place.

Open one of the sample applications in Eclipse. Right-click on the project in the Package Explorer and choose Properties. Look at the Builders section. There are two Import QCAR builders, one for Windows and one for Mac/Linux (bash), and only one of them should be checked. Now edit the builder for your OS, and you will see that it calls the copyQCARLibs.bat or copyQCARLibs.sh script. In your new project, you'll want to create a similar builder to call the correct script.

Note: Be sure to change the project name in the Working Directory and Arguments fields, it should match the project name in Eclipse.

- Kim

Log in or register to post comments