"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

Building QCAR unity package within Eclipse

Hi, I am facing problem when building QCAR unity package project into eclipse. I made the following steps: 1- following the below thread [url]https://ar.qualcomm.com/arforums/showthread.php?t=326&highlight=unity+project[/url] 2- Adding QCAR.jar, QCARUnityPlayer.jar to android project 3- Extending the class PlayerActivity the result after running on Nexus s: The app has stopped unexpectedly. After debugging: Exception: java.lang.unsatisfiedlinkerror Could't load mono: findLibrary ..... I am stuck for a day with this error Please help.

When I went through these steps I ended up with libmono.so and libunity.so in the assets/libs/armeabi-v7a folder of my custom project. Are you getting that as well? Also, what version of Unity are you using? Just to double check, can you run the QCAR sample inside Unity successfully? - Kim

ahmed_ameen21

Wed, 05/18/2011 - 13:10

Thanks Kim, It worked successfully after I copied the libs folder from library project into assets folder of my project & [B]copying it again to the root project folder[/B]. It is not QCAR problem. Thanks again.

Hi, I followed your instructions too and ended up with own working android project in eclipse with my own qualcomm-unity-activity. There I created own activities and extended the special quar-activity [B" />PlayerActivity[/B" />. I can start it from other activities and all works like a charm.

Hi, I followed the steps given by Kim in post #2 (and the URL mentioned in the post). There are several problems. 1. When I linked the library project to custom Android project and then tried to add the QCARUnityPlayer.jar to the custom Android project, it gives compile errors.

For your first problem, did you set up the StagingArea project as an Android library? There shouldn't be any collisions of the R files if you set that up correctly. For your runtime exceptions, please look at the Android log file for any errors.

Thanks Kim. I did setup the project as per the given steps. Is there any place where I can go wrong? The file structure of my StagingArea project is in fileStructure.txt. In my custom android project, there are two packages inside 'gen'; my custom package and com.qualcomm.QCARUnityPlayer.

Sorry for the late reply, were you ever able to get this to work? The only thought I have looking at these files is perhaps this is a naming issue. For your Unity project, did you use com.qualcomm.QCARUnityPlayer for the bundle identifier?

Thanks Kim. I solved the problem according to your suggestion. :) Thanks a lot. I just changed the package name in AndroidManifest.xml (in StagingArea project) file to some other package (other than com.qualcomm.QCARUnityPlayer). Then removed the 'gen' folder.

Hi, I want to use several Unity-QCAR projects as several library projects in my main eclipse android project, but in every library there is the same package structure and class name "com.qualcomm.QCARUnityPlayer.PlayerActivity". Is there a way to change this in unity?

Hi, I use an activity that extends the [I]PlayerActivity[/I] and that one is used in an [I]ActivityGroup[/I] as a kind of subactivity with the [I]LocalActivityManager[/I]. With the activity itself it works all well, but if I try to go to next Activity something weird happens..

Could you please give some hints or instructions how to finish the [I][B]PlayerActivity[/B][/I] correctly?! It's a source for errors and a bad user experience if the app closes or the whole app history is disturbed.

The PlayerActivity is designed to be the main activity, you can start another activity from the PlayerActivity but we have not tested a scenario where the PlayerActivity is created and destroyed multiple times during app execution.