In the Contents area, you will need to select Create project from existing sample, and then select a sample from the dropdown list. To begin, you create a New Android Project from the Eclipse File menu. The second issue was not adding the proper packages (.jar files) to the sample app to get it to run (or adding them, but not refreshing the app before I tried to run the emulator). The initial problem was the pathname issue mentioned above. I consider myself to be a computer savvy person, and I have set up development environments before, but it literally took me two days to get it to work properly. If it doesn’t work, well–back to the drawing board. If it works, you’re all set to begin creating apps. Running a Sample Application in the Android Emulatorīeing able to run one of the included sample applications in the Android Emulator that comes with the Android SDK is a good test of your installation. If you look at the pathname shown in Eclipse for the Android SDK, it might look like this: C:\Program Files\Android\android-sdkįor it to work, it needs to look like this: C:\PROGRA~1\Android\android-sdk The part of the output that you will actually need is “PROGRA~1”. ![]() I do that using this command: dir /x > shortcuts.txt The problem is, you can’t easily cut and paste from the command prompt window, so I just channel the output into a text file, which I can then cut and paste from. That will produce a directory listing that will include the Program Files directory, and the part that you are looking for will appear similar to this: 04:34 PM PROGRA~1 Program Files Fortunately Windows creates a shortened pathname for cases like that, and you just need to find that pathname.Īn easy way to find it is to open up a command prompt, change to your root directory, and enter the following command: dir /x If you’re on a Windows computer, that’s because the path to Program Files includes a space, and Eclipse (and the Java VM that runs it) can not use a path with a space. The error messages refer to the fact that Eclipse couldn’t find the Android SDK based on the pathname you entered when you installed Eclipse. It may look very similar to this: invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe. If you’ve gotten this far and tried to run some of the sample applications, you may have noticed a few error messages, along with the fact that the Android emulator most definitely did NOT run. Potential Android SDK Roadblock: Pathname We will now move on to actually trying out Eclipse with an Android app, and will check out the Android emulator. We’ve also already walked you through the process of using the AVD Manager to download and install the various components used by the Android SDK, including previous version releases, sample apps and documentation. We have already discussed the process of installing the Android SDK on your computer, as well as the Eclipse IDE and the ADT Plugin for Eclipse, which allows you to work with the Android SDK. In this article we will show you how to get the Eclipse IDE to run a sample app using the Android Emulator. In recent articles we discussed the difference between web apps and native apps, and went through the steps required to set up your computer for Andcroid app development.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |