150 likes | 302 Views
Eclipse Tutorial. Barrett Summer Scholars 2011 Sustainable Engineering: Learning to Engineer Truly Green Products. Agenda. What is Eclipse? Making My Own Android Application Installing a platform Creating an AVD Creating a new Android project Constructing different UI
E N D
EclipseTutorial Barrett Summer Scholars 2011 Sustainable Engineering: Learning to Engineer Truly Green Products
Agenda • What is Eclipse? • Making My Own Android Application • Installing a platform • Creating an AVD • Creating a new Android project • Constructing different UI • Running Application!
What is Eclipse? • Programming Interface used for mobile applications • Like Android! • Programs in Java, C, and C++
Installing a Platform • Open Eclipse • Window → Android SDK and AVD Manager • Available Packages (Left side of window) • Check Android Repository • Choose latest vision • Click Install Selected
Creating an AVD • Open Eclipse • Window → Android SDK and AVD Manager • Left of Window → Virtual Devices • Click New button on right → Create New AVD Window appears • Name = my_avd • Choose target = platform emulator runs on • Create AVD
Creating a New Android Project • Open Eclipse • File → New → Project • New Project Window opens • Android → Android Project • Target needs to be the same as AVD! • Project Name: HelloAndroid • Application Name: Hello, Android • Package Name: com.example.helloandroid • Create Activity: HelloAndroid
Android Projects • Project Name • the name of the directory that will contain the project files • Application Name • This is the human-readable title for your application, the name that will appear on the Android device • Package Name • Package namespace (following the same rules as for packages in the Java programming language) that you want all your source code to reside under • Create Activity • Name for the class stub that will be generated by the plugin,will be a subclass of Android'sActivity class.
Constructing UI’s • Open source code • HelloAndroid→src→ com.example.helloandroid→ HelloAndroid.java • OR Open XML file • HelloAndroid→ res → layout → main.xml • At each point a user would manually program the UI to their digression
Run the Application • Run → Run • ORClick on the green play button on the Eclipse toolbar • Emulator will appear as the UI you designed • Be patient! • “Hello, Android”
Congratulations! You just made your first Android Application!