Hi,
I have an Android project working in Unity. I built the apk and the app works fine. Now I want to integrate this part inside of my application in Eclipse. I followed these steps:
https://developer.vuforia.com/resources/dev-guide/extending-unity-android-activity-and-adding-custom-views-eclipse
I didn't reach the Code Changes part, I stopped at the step 15 of the Integration Steps, and there I get an error if I try to run the application. I tried it twice from scratch, so I don't think I missed any step.
I'm getting the following error:
[2013-03-27 10:23:40 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/qualcomm/QCARUnityPlayer/R$attr;
If I remove QCAR.jar and QCARUnityPlayer.jar from QCARJava /libs folder the error is gone, but then the application crashes because it can't find com.qualcomm.QCARUnityPlayer.QCARPlayerProxyActivity.
I tried to clean both projects and to remove the QCARJava /bin folder but the problem is still there. This is my project explorer:
http://img109.imageshack.us/img109/2366/qcarfileexplorer.png
Anybody knows what might be causing this error and how can I fix it? Is it because there's a qcarunity.jar inside QCARUnity /bin?
Thanks!
Integrate Unity and Eclipse: Unable to execute dex
Hi,
it looks like you miss these libraries in your QCARJava project structure:
Integrate Unity and Eclipse: Unable to execute dex
I did all the steps again and I found a mistake I made: if I move the entire /lib folder from QCARUnity to QCARJava the folders don't merge, actually it does nothing. Now I copied it manually and in QCARJava I have:
Integrate Unity and Eclipse: Unable to execute dex
Hey, now reading again your original post; you say that you stopped at step 15;
actually, you also need to perform these extra part (which I copy-paste here):
Integrate Unity and Eclipse: Unable to execute dex
I've done those steps and the error is still the same.
When I import the QCARUnity in eclipse (step 6), I need to change project.properties to remove some errors. In project.properties android-target is set to 8, and I need it to be 17, otherwise the attributes:
Integrate Unity and Eclipse: Unable to execute dex
Ok,
the fact that you change the android-target to 17 is certainly something that you should not do, unless you set the same target version in Unity as well (the two must be consistent, otherwise the whole integration will not work);
Integrate Unity and Eclipse: Unable to execute dex
Ok, with a different package name that error is gone. If someone else finds this error, you cannot use com.qualcomm.QCARUnityPlayer as your package name.
But now I found myself with another error when the app starts:
Integrate Unity and Eclipse: Unable to execute dex
Ok, glad to see that the first problem is solved;
concerning the runtime crash, have you done this step too ?
Integrate Unity and Eclipse: Unable to execute dex
Yes, I did it because I got the ClassDefNotFound error.