4.1 Import MMIR StarterKit into Eclipse - mmig/mmir GitHub Wiki
Importing MMIR-StarterKit into Eclipse
To import the MMIR StarterKit as Eclipse project follow these steps:
- 
Start Eclipse and go to File → Import. 
- 
Select Existing Project into Workspace and click the Next button. 
- 
Click the radio button next to Select archive file and click the Browse button on the following dialog. 
- Navigate to MMIR-StarterKit.zip on your disk. Click open to select it.
StarterKit example is based on the Apache Cordova platform and has almost the same structure as a Cordova project. Figure 10 illustrates the structure of StarterKit project in Eclipse.
Common Problems
The following sections gives help for some common problem and issues that may occur when importing the MMIR-StarterKit into Eclipse.
If you experience compilation errors, some of the following steps may help:
- 
After importing, set the correct Android version: open the project's Properties → Android, in the section Project Build Target select the Android version you target. If you reference other Android projects, ensure that they are correctly linked in the Library section; if in doubt, go through the steps to Remove, Apply, and re-Add... for the referenced projects. 
- 
Ensure that the correct Java compiler version is used: in the project's Properties → Java Compiler, set the Java compiler compliance level to 1.5 (5) or 1.6 (6). 
- 
For Android ADT version 22+: If you experience problems that classes cannot be found which should be available by referenced JAR libraries, go through the following steps: - ensure that all referenced libraries are located in the project folder/libs(or in a subfolder thereof)
- open the project's Properties → Java Build Path
- select the Libraries tab and ensure that all required JAR files are referenced (note that there is an entry Android Private Libraries which older ADT versions do not show)
- Go to the Order and Export tab and check all boxes for the referenced JAR libraries (i.e. export them, see Figure 12)
 
- ensure that all referenced libraries are located in the project folder
- If you remove or replace a JAR library in /libs, you should "physically" first remove the library, rebuild the project, and – in case of a replacement – then add the new library (and rebuild). Simply removing the library in the project's Properties → Java Build Path may not be enough to work (in this case you may experience some error messages containing something similar toConversion to Dalvik format failed with error 1in the LogCat output console).
Deploy to Simulator
- Right click the project and select Run As →Android Application.
- Eclipse will ask you to select an appropriate AVD. If there does not exist one, then you need to create it.
Deploy to Device
- Make sure USB debugging is enabled on your device and plug it into your system (Settings → Applications → Development).
- Right click the project and select Run As →Android Application.
Deployment for Web Site
- Open assets/www/index.htmlin a web browser (see also Notes on compatibility below)
- Alternatively, you can also host the contents of assets/www/on a web server
Notes on Browser compatibility:
- Google Chrome has additional restrictions for accessing local files. For Web Site Deployment as local file (i.e. directly opening /index.html in a browser) an additional command-line switch is required in order to allow the MMIR framework access to its local files:
--allow-file-access-from-filesNote, that- This command-line option will only work, if no other instances of Chrome are running, when starting the application with this switch
- Afterwards, this command-line option applies to all (newly opened) instances of Chrome
- This option should not be used, when browsing the Internet, but only for development purposes, since it may pose a security risk
 
Notes on support for speech interactions:
- the StarterKit example is setup to use the Web Speech API which is currently only supported by Chrome TBD: describe all available speech input modules!
For speech input modules that require access to the microphone via getUserMedia:
- Google Chrome supports access to the microphone since ver. 21.x
- for older versions of Chrome you may need activate the Web Audio Inputinchrome://flags/
- when asked, choose Acceptfor granting access to the microphone
 
- for older versions of Chrome you may need activate the 
- Mozilla FireFox supports access to the microphone since ver. 17.x
- when asked, choose Acceptfor granting access to the microphone
 
- when asked, choose 
< previous: "Getting Started" | next: "Run MMIR StaterKit" >