Android: Using the Eclipse IDE for Java Development

Nowadays, software tool developers use an Integrated Development Environment (IDE) for easier Java development. The most widely accepted IDE among Java developers is Eclipse. This table gives you quick tips for using the Eclipse IDE to develop Android apps.















































TaskHow to accomplish
Start a new Android projectFrom the New Project screen, under Android in the Wizards
panel, select Android Project.
Create and starting an emulatorFrom the Window menu, select Android SDK and AVD Manager.
Select Virtual Devices and click on New. Enter a name for the
virtual device, set the target and click on Create AVD. The device
will be created. You will be placed back in the Virtual Devices
screen. From the list of devices, select the device you just
created and click on Start.
Deploy your app on a deviceRight-click on the project that contains the app, select Run
As, and then select Android Application.
Bring up the logcat windowFrom the Window menu, select Show View, and then Other. From
the list of views shown, select logcat.
Debug your applicationDeclare your application as "debuggable" in its manifest. To do
this in Eclipse, view the Manifest, open the Applications tab, and
set the field named Debuggable to true (or edit the XML directly,
add android:debuggable=class="code">"trueclass="code">" as an attribute to the class="code"><application> element). Enable USB
debugging on Windows and Linux (see href="http://developer.android.com/sdk/win-usb.html">Google USB
Driver and href="http://developer.android.com/guide/developing/device.html">Using
Hardware Devices). Right-click on the project that contains the
app, select Debug As and then select Android Application
See what devices are availableFrom the Window menu, select Show View, and then Other. Select
Android, and then select Devices
Open the DDMS perspective to browse a deviceFrom the Window menu, select Open Perspective, and then
DDMS.
Upload a file to a deviceOpen the DDMS perspective to browse the device. In the File
Explorer tab, click and highlight the directory into which you want
to upload the file. Then select the little icon at the top of the
window whose tooltip says, "Push a file onto the device".
Use the profilerIn the Devices view, select the running project. Start the
profiling by clicking on the icon to the left of the Stop sign
(tooltip reads, "Start Method Profiling").
Set up an Android Unit Test projectIn the Resource or the Java perspective select
File->New->Other-Android Test Project. Set the name of the
Android development project that is being tested.








dummies

Source:http://www.dummies.com/how-to/content/android-using-the-eclipse-ide-for-java-development.html

No comments:

Post a Comment