SL4A - Working with Eclipse

This chapter will walk you through the basics of Eclipse IDE and configuring it to develop Python scripts for Android.

Basics of Eclipse

Eclipse is an application with many capabilities and options. A welcome screen will greet you, the first time you launch the program. Eclipse uses a number of basic concepts and terminology to address different functions and operations of the program.

Some of these terminologies are explained here −

Workbench − It identifies the overall window of the Eclipse application. It contains multiple child windows, each window containing multiple tabs.

Workspace − It refers to the location on your system’s file system where projects created using Eclipse will be saved.

Workspace Launcher

Perspective − It is a personal preference for which menus and windows are open at any one time. Eclipse has a number of perspectives configured for typical usage, such as writing code, debugging etc. You can also switch to a different perspective when your activity changes. Perspectives are also customizable.

Installing Plugins for Eclipse

One needs to configure Eclipse to be able to develop SL4A applications. Once the prerequisites are installed successfully on the host, the following plugins for Eclipse must be added −

The following steps can be used to install plugins on Eclipse −

  • Step 1 − Click Help.

  • Step 2 − Select Install New Software.

  • Step 3 − Click Add.

  • Step 4 − Specify the name and the URL to access the plugin. Click OK.

  • Step 5 − Select all the tools and click Next. The plugin installation starts

Add Repository

Python Interpreter in Eclipse

Follow the given steps to configure Python Interpreter in Eclipse.

  • Step 1 − Select WindowsPreferences.

  • Step 2 − Go to PyDevInterpreterPython.

  • Step 3 − Click the New button.

  • Step 4 − Specify a name for the interpreter. In the Location field, enter the path to python.exe. For example, C:\Python26\python.exe

  • Step 5 − Click OK.

Python Interpreter Eclipse
Kickstart Your Career

Get certified by completing the course

Get Started