…or how I finally got the thing to compile and am now starting to augment my reality.
Mixare is an open source (GPLv3) augmented reality platform. I’ll write more blogs about it in the future, but you can read about it here: http://www.mixare.org/
While a lot can be done with the Android application as-is, you may want to tinker with the code or create your own custom plugin (more on that in a future blog post). I found the instructions for getting the environment set up to be overly confusing. After a lot of work, I finally got the project to compile and run. I hope this tutorial helps people in a similar situation.
Step 1: Get Your Android Development Environment Ready
1. Go to http://developer.android.com/sdk/index.html to download Eclipse w/ the Android SDK
2. If you don’t already have the Java Development Kit, get it from: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Step 2: Get a Copy of the Mixare Source
1. Download from https://github.com/mixare/mixare. Just click on the ‘Zip’ button.
Step 3: Get Mixare Set Up in Eclipse
1. Find the Eclipse.exe under the adt-bundle-windows\eclipse folder and start Eclipse.
3. Select to import projects to your workspace.
4. Go to File > Import… and then under General, select to import existing projects into workspace. I selected the checkbox to make a copy of the project and place that in the workspace, but that is optional.
5. You may see an error like this appear in the console: [2012-12-01 14:56:49 – mixare] Unable to resolve target ‘Google Inc.:Google APIs:10’. This error stems from not having the target SDK version installed.
If you just downloaded the ADT, you need to download the appropriate version of the SDK. IMPORTANT: Mixare requires not only the SDK but the Google API to be downloaded. To get the SDK and API, go to Window > Android SDK Manager
6. Then associate the Google API with the mixare project by right-clicking on the project, selecting Properties and selecting the API under the Android section:
7. You may see a console error concerning the compliance level. As requested, right-click on the project and select Android Tools > Fix Project Properties.
8. Both the plugins located in the plugins folder and the main mixare code have a dependency on the mixarelib, therefore, you’ll need to import the mixarelib as an additional project in the workspace. You can find the mixarelib project under mixare\plugins\mixare-library
9. In the console, Eclipse will complain that there is no res (or resource) folder defined for the mixarelib. I created a new folder under the mixarelib with name of res.
10. Just like you did for the main mixare project, you will want to fix the compliance level issue and set the Android Build Target to the SDK (you can select Google API, but just the basic SDK is needed). Additionally, you will want to check the ‘Is Library’ checkbox on the Android screen.
11. Next, you’ll want to run the Ant Build to generate the mixarelib’s jar file. Right-click on the Build.xml file in the mixarelib project and select to Run As > Ant Build. You should then see a message in the console once this is complete, and a mixarelib.jar file in the bin folder.
12. Go to the main mixare project, right-click and select Properties. Under the Android section, remove the reference to the mixarelib under the plugins folder and replace it with a reference to the new mixarelib project just created.
13. Next, select the Java Build Path option and add the mixarelib jar to the build path via the Order and Export tab.
14. Also add the jar under the Libraries tab.
Step 4: Test the Build
1. At this point there should be no errors in the console and you should be able to build the project. You can test that the build succeeds and the apk is generated by right-clicking on the main mixare project and selecting to Run As > Android Application.
2. If you haven’t created an emulator yet you will be prompted to create one. If you have never dealt with Android emulators before I warn you that they are slooowwww.
3. Eventually the emulator will appear and under the applications screen you should see the same mixare icon that you would see on a normal phone.
4. I haven’t been successful using mixare in the emulator enviornment — it complains that there is no internet connection. Since mixare is meant to run in landscape mode, you may want to orient your emulator in that direction. On Windows 7 use left-ctrl + F11. You should be able to debug on a real phone using the instructions here: http://developer.android.com/tools/device.html