Downloading the Java Android SDK and the Emulator
1. Download the Android SDK on to your computer.![Download Download](http://appinventor.mit.edu/explore/sites/all/files/SetupAI2/emulator/emulator_connect_progress.png)
Invent apps with MIT App Inventor. Contribute to cdpoffline/appinventor development by creating an account on GitHub. Jan 09, 2014 Here is a link to download the new file: http://appinventor.mit.edu/explore/ai2/update-setup-software.html.
http://developer.android.com/sdk/index.htmlThink you already have it? Open a terminal and type 'android'. If it's there, the Android SDK and AVD Manager will appear. Skip down to 5.
2. Place the android SDK in a suitable location (e.g., /Applications on the Mac)
3. You may need to change your path. Here's one way to do it:
3. You may need to change your path. Here's one way to do it:
open .bash_profile in your home directory (or create if it doesn't exist)
Add the following line:
export PATH=${PATH}:/Applications/android-sdk-mac_86/tools
(assuming SDK folder is named android-sdk-mac_86 and its in /Applications)
At a terminal, enter 'source .bash_profile'. This will run the export command.
![Inventor Inventor](http://appinventor.mit.edu/explore/sites/all/files/SetupAI2/emulator/first.png)
4. From a terminal, enter 'android' to open the Android SDK and AVD Manager.
5. In the manager, choose 'Available Packages' and select the 1.6 version and any others you want. These downloads are a bit slow so you may not want to download all of them.
6. In Virtual Devices, click new and name the new avd 'basic'. Select one of the targets that appear.
7. Choose a virtual device and click Start to run the emulator.Testing an App Inventor app with the emulator
1. Disconnect any phones from your computer.2. In the App Inventor Blocks Editor, choose 'Connect to Phone'. Your app should appear within the emulator within 30-40 seconds.
Download and running an app in the emulator
1. In the App Inventor Designer, choose Package for Phone | Download to ComputerDownload the app to your computer. This will create a file with the extension .apk (an android package).
b. Open a different terminal window than the one that started the emulator and run the install command. If you downloaded the app (.apk file) into the Downloads folder, you'll type:
adb install -r Downloads/Purr.apk
c. Be careful the second time you download the same app-- on some systems it will be given a different name such as Purr(2).apk. The abd install program doesn't allow parenthesis in file names, so you'll probably want to rename it on your computer before installing it on the emulator.
These instructions are for the emulator that comes with the older version of the SDK (1.5x).
An AVD is an emulator instance for a particular version (e.g., 1.6) of the phone.
Enter the commands below in the terminal:
This will show you a numbered list of the 'targets' that come as part of your sdk. For me, android 1.5 came as #2.
android create avd -n basic -t 2
This creates an AVD named 'basic'. The '2' corresponds to the target.
You only need to do the above commands once, to create your virtual device.
An AVD is an emulator instance for a particular version (e.g., 1.6) of the phone.
Enter the commands below in the terminal:
This will show you a numbered list of the 'targets' that come as part of your sdk. For me, android 1.5 came as #2.
android create avd -n basic -t 2
This creates an AVD named 'basic'. The '2' corresponds to the target.
You only need to do the above commands once, to create your virtual device.
- Go to http://appinventor.mit.edu/explore/ai2/mac.html;
- Follow the AI2 installation instructions beginning with 'Download the Installer';
- You may need to update the security settings on your Mac in order to install software downloaded outside of the App Store;
- To do so, go to 'System Preferences' --> 'Security and Privacy', and choose 'Allow Apps Downloaded from Mac App Store and Identified Developers';
- Having done this, you can now right-click on the downloaded AI2 software, and choose 'open' in order to bypass the installation gatekeeper (rather than double clicking the .dmg file to install);
- After setup is complete, go to http://ai2.appinventor.mit.edu;
- In the app inventor menu bar, choose 'Connect' --> 'Emulator';
- The emulator should launch in a second window automatically;
- You may be prompted to update the emulator software; follow the prompts to install the update.