Log in or register to post comments

Android problem extending QCARPlayerActivity

January 30, 2013 - 7:55am #1

Hello everybody,

I'm trying to extend a Unity Android Activity and adding custom views in Eclipse. I've followed this guide https://developer.vuforia.com/resources/dev-guide/extending-unity-android-activity-and-adding-custom-views-eclipse.

 

On Unity I can generate the .APK with my own 3d model and it run perfectly in my Android device. Then, after build tha Android library based on /StartingArea folder from Unity project and build an Android project to call this library as the guide says, Elcipse show me the next errors at Run time::

 

01-30 16:33:08.670: E/dalvikvm(1056): Could not find class 'com.qualcomm.QCARUnityPlayer.QCARUnityPlayerLegacy', referenced from method com.qualcomm.QCARUnityPlayer.QCARPlayerSharedActivity.createUnityPlayer
01-30 16:33:08.670: E/dalvikvm(1056): Could not find class 'com.qualcomm.QCARUnityPlayer.QCARUnityPlayer', referenced from method com.qualcomm.QCARUnityPlayer.QCARPlayerSharedActivity.createUnityPlayer
01-30 16:33:08.680: E/dalvikvm(1056): Could not find class 'com.qualcomm.QCARUnityPlayer.QCARUnityPlayer', referenced from method com.qualcomm.QCARUnityPlayer.QCARPlayerSharedActivity.onCreate
01-30 16:33:08.680: E/QCAR(1056): The library libQCAR.so could not be loaded
01-30 16:33:08.690: E/QCAR(1056): The library libQCARWrapper.so could not be loaded
01-30 16:33:08.690: E/QCAR(1056): The library libQCARUnityPlayer.so could not be loaded
01-30 16:33:08.690: E/AndroidRuntime(1056): FATAL EXCEPTION: main
01-30 16:33:08.690: E/AndroidRuntime(1056): java.lang.NoClassDefFoundError: com.qualcomm.QCARUnityPlayer.QCARUnityPlayer
01-30 16:33:08.690: E/AndroidRuntime(1056): at com.qualcomm.QCARUnityPlayer.QCARPlayerSharedActivity.onCreate(QCARPlayerSharedActivity.java:210)
 

Could anyone help me please?¿.

Thanks vey much in advance!!

 

 

Android problem extending QCARPlayerActivity

January 30, 2013 - 9:48am #7

Thank you very very much for your help AlessandroB. I'll try again step by step.

ciau!!

Android problem extending QCARPlayerActivity

January 30, 2013 - 9:42am #6

Hi, sorry that it does not work for you;

normally you have to pay attention to execute all the steps in that article very precisely and in the exact same order in which they are mentioned;

the procedure is not complex but even a little difference in the execution (e.g. copying a directory rather than moving it, or any other little difference in the AndroidManifest.xml) can lead to a failure in Eclipse;

have a look at this thread:

https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/need-help-including-unity-project-library-eclipse

Here we discussed the same topic...

 

Android problem extending QCARPlayerActivity

January 30, 2013 - 9:25am #5

I get the same result.,., ;(.  Do you know some source code sample or another guide to 

Extending Unity Android Activity and Adding Custom Views in Eclipse??

It can't be so difficult!!!!!.,., 

 

01-30 18:19:14.790: E/QCAR(1544): The library libQCAR.so could not be loaded
01-30 18:19:14.790: E/QCAR(1544): The library libQCARWrapper.so could not be loaded
01-30 18:19:14.790: E/QCAR(1544): The library libQCARUnityPlayer.so could not be loaded
01-30 18:19:14.810: E/Unity(1544): Unable to locate player settings. bin/Data/settings.xml
01-30 18:19:14.810: E/AndroidRuntime(1544): FATAL EXCEPTION: main
01-30 18:19:14.810: E/AndroidRuntime(1544): java.lang.UnsatisfiedLinkError: Couldn't load mono: findLibrary returned null
01-30 18:19:14.810: E/AndroidRuntime(1544): at java.lang.Runtime.loadLibrary(Runtime.java:425)
01-30 18:19:14.810: E/AndroidRuntime(1544): at java.lang.System.loadLibrary(System.java:554)
01-30 18:19:14.810: E/AndroidRuntime(1544): at com.unity3d.player.UnityPlayer.j(Unknown Source)
01-30 18:19:14.810: E/AndroidRuntime(1544): at com.unity3d.player.UnityPlayer.<init>(Unknown Source)
01-30 18:19:14.810: E/AndroidRuntime(1544): at com.qualcomm.QCARUnityPlayer.QCARUnityPlayer.<init>(QCARUnityPlayer.java:29)
01-30 18:19:14.810: E/AndroidRuntime(1544): at com.qualcomm.QCARUnityPlayer.QCARPlayerSharedActivity.createUnityPlayer(QCARPlayerSharedActivity.java:517)
01-30 18:19:14.810: E/AndroidRuntime(1544): at com.qualcomm.QCARUnityPlayer.QCARPlayerSharedActivity.onCreate(QCARPlayerSharedActivity.java:222)
01-30 18:19:14.810: E/AndroidRuntime(1544): at com.qualcomm.QCARUnityPlayer.QCARPlayerActivity.onCreate(QCARPlayerActivity.java:37)
01-30 18:19:14.810: E/AndroidRuntime(1544): at And.com.MainActivity.onCreate(MainActivity.java:41)
01-30 18:19:14.810: E/AndroidRuntime(1544): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
01-30 18:19:14.810: E/AndroidRuntime(1544): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1715)
01-30 18:19:14.810: E/AndroidRuntime(1544): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1767)
01-30 18:19:14.810: E/AndroidRuntime(1544): at android.app.ActivityThread.access$1500(ActivityThread.java:122)
01-30 18:19:14.810: E/AndroidRuntime(1544): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1005)
01-30 18:19:14.810: E/AndroidRuntime(1544): at android.os.Handler.dispatchMessage(Handler.java:99)
01-30 18:19:14.810: E/AndroidRuntime(1544): at android.os.Looper.loop(Looper.java:132)
01-30 18:19:14.810: E/AndroidRuntime(1544): at android.app.ActivityThread.main(ActivityThread.java:4028)
01-30 18:19:14.810: E/AndroidRuntime(1544): at java.lang.reflect.Method.invokeNative(Native Method)
01-30 18:19:14.810: E/AndroidRuntime(1544): at java.lang.reflect.Method.invoke(Method.java:491)
01-30 18:19:14.810: E/AndroidRuntime(1544): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
01-30 18:19:14.810: E/AndroidRuntime(1544): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
01-30 18:19:14.810: E/AndroidRuntime(1544): at dalvik.system.NativeStart.main(Native Method)
 
thanks., I'll try to build the whole project again.,.,.,
 

Android problem extending QCARPlayerActivity

January 30, 2013 - 9:04am #4

Hi, thanks for the screenshot; the list of JAR files that you have got there is a bit different from what I get in my Eclipse project;

however that screenshot is illuminating, as it shows that in your case you probably need to also tick (check) the last 3 items in the list (i.e. QCAR.jar, qcarplayerproxyactivity.jar and QCARUnityPlayer.jar);

hopefully that should fix it.

Android problem extending QCARPlayerActivity

January 30, 2013 - 8:56am #3

Hi again, and thanks for the reply,

I have checked the three items at Java Build Path (Order and Export section) as you recommend, but I obtain the same result.

You can see my JavaBuildPath estructure in the next image capture:: 

https://www.dropbox.com/s/50xakbb7ylomf8u/capture.bmp

One more thing, I'm running the project directly into my Android device, and I'm not generating the APK file, should I do?

thanks.,!!!

Android problem extending QCARPlayerActivity

January 30, 2013 - 8:18am #2

Hi, the issue is almost certainly due to the fact that you need to export some jars with your APK;

to fix this, go to project Properties, select Jaba Build Path -> select Order and Export tab -> check (tick) the "Android X.Y", "Android Dependencies" and "classes.jar";

build and run again; it should be OK then.

 

 

Log in or register to post comments