1 / 20

First Venture into the Android World

First Venture into the Android World. Chapter 1 Part 2. Creating a New Project. To create a new Android project, you first open Eclipse and then select an Android project. As you create your first project, you provide the following information. (Next Slide). Creating the Hello World Project.

scot
Télécharger la présentation

First Venture into the Android World

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. First Venture into the Android World Chapter 1 Part 2

  2. Creating a New Project To create a new Android project, you first open Eclipse and then select an Android project. As you create your first project, you provide the following information. (Next Slide)

  3. Creating the Hello World Project Project – a single program or app using Java and the Android SDK. Open the new dialog box by click new icon New button Android Application Project

  4. Click the Next Button Next Button

  5. New Application Dialog Box

  6. Application Name is the app name that appears to users. For this project, use "My First App." Project Name is the name of your project directory and the name visible in Eclipse. Package Name is the package namespace for your app (following the same rules as packages in the Java programming language). Your package name must be unique across all packages installed on the Android system. For this reason, it's generally best if you use a name that begins with the reverse domain name of your organization or publisher entity. For this project, you can use something like "com.example.myfirstapp." However, you cannot publish your app on Google Play using the "com.example" namespace. Build SDK is the platform version against which you will compile your app. By default, this is set to the latest version of Android available in your SDK. (It should be Android 4.1 or greater; if you don't have such a version available, you must install one using the SDK Manager). You can still build your app to support older versions, but setting the build target to the latest version allows you to enable new features and optimize your app for a great user experience on the latest devices. Minimum Required SDK is the lowest version of Android that your app supports. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set. If any feature of your app is possible only on newer versions of Android and it's not critical to the app's core feature set, you can enable the feature only when running on the versions that support it.

  7. Building the User Interface Android supports two ways to build Apps. Java XML

  8. Configure Launcher Icon This will allow you to put the image in of the icon for the App

  9. Package Explorer Expand Hello World Project

  10. Layout

  11. Widgets

  12. XML CODE XML code for TextView control Text code to change

  13. Run As Dialog Box Android Application

  14. Message in the Android Emulator

  15. Save Project and Close Program is saved each time it is run CTRL + F11 – is the shortcut keys for running your Android Application in Eclipse. Close – Click Close button or File Menu

  16. Opening a Saved App in Eclipse Select project from the Package Explorer. If not listed on the Package Explorer, click File on the Eclipse menu bar and select import. In the Import dialog box, expand the General folder, and click Existing Project into the Workspace. Click the next button Click Browse and find it in your drive.

  17. Delete a Project Right click the project name in the package explorer. Select Delete. Click OK

  18. Summary Android is an open source platform. Android OS is free We use Eclipse IDE to write applications. Android Emulator allows you to make Android Application without using a physical device. Android use both XML and Java for building an user interface. Package Explorer in Eclipse contains all the folders for an Android project. Layout is a container of objects (TextView, Buttons, and CheckBox controls, etc..) After you create your application, you can test it on the Android Emulator.

More Related