apress beginning android 4 (2012)

575 6.8K 0
apress beginning android 4 (2012)

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... to read Learn Java for Android Development by Jeff Friesen (Apress, 2010) CHAPTER 2: How to Get Started Step 2: Install the Android SDK The Android SDK gives you all the tools you need to create and test Android applications It comes in two parts: the base tools, and version-specific SDKs and related add-ons Install the Base Tools You can find the Android developer tools on the Android Developers web... Figure 2–2 Android SDK and AVD Manager available packages Open the Android Repository branch of the tree After a short pause, you will see a screen similar to Figure 2–3 Figure 2–3 Android SDK and AVD Manager available Android packages Check the boxes for the following items: “SDK Platform” for all Android SDK releases you want to test against “Documentation for Android SDK” for the latest Android SDK... SDK” for the latest Android SDK release, and perhaps for older releases if you wish Then, open the Third party Add-ons branch of the tree After a short pause, you will see a screen similar to Figure 2 4 CHAPTER 2: How to Get Started Figure 2 4 Android SDK and AVD Manager available third-party add-ons Click the “Google Inc add-ons” branch to open it, as shown in Figure 2–5 Figure 2–5 Android SDK and AVD... devices that you do not own The Android emulator can emulate one or several Android devices Each configuration you want is stored in an Android Virtual Device (AVD) The Android SDK and AVD Manager, which you used to download the SDK components earlier in this chapter, is where you create these AVDs If you do not have the SDK and AVD Manager running, you can run it via the android command from your SDK’s... AVD; see Figure 2– 14) or the keyguard (see Figure 2–15) 19 20 CHAPTER 2: How to Get Started Figure 2– 14 Android home screen If you get the keyguard, press the Menu button or slide the green lock on the screen to the right, to get to the emulator’s home screen Figure 2–15 Android keyguard CHAPTER 2: How to Get Started Step 6: Set Up the Device With an emulator set up, you do not need an Android device to... trivial) Android application The process differs depending on whether you are using an IDE like Eclipse or the command line Eclipse From the Eclipse main menu, choose File ➤ New ➤➤ Project to open the New Project dialog box, which gives you a list of project type wizards to choose from Expand the Android option and click Android Project, as shown in Figure 3–1 23 24 CHAPTER 3: Your First Android Project... you have to go through a few steps to set up a run configuration, so Eclipse knows what you want to do First, in the Run As dialog box, choose Android Application, as shown in Figure 3 4 27 28 CHAPTER 3: Your First Android Project Figure 3 4 Choosing to run as an Android application in the Eclipse Run As dialog box Click OK If you have more than one emulator AVD or device available, you will then get... inside of this project, so you understand what Android gives you at the outset and what the roles are for the various directories and files Project Structure The Android build system is organized around a specific directory tree structure for your Android project, much like any other Java project The specifics, though, are fairly unique to Android the Android build tools do a few extra things to prepare... shell script If you run that, you will be presented with the Android SDK and AVD Manager, shown in Figure 2–1 Figure 2–1 Android SDK and AVD Manager At this point, you have some of the build tools, but you lack the Java files necessary to compile an Android application You also lack a few additional build tools, and the files necessary to run an Android emulator To address this, click the Available packages... SYSFS{idProduct}=="13 54" , MODE="0666" SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="681c", MODE="0666" Drop that in your /etc/udev/rules.d directory on Ubuntu, and then either reboot the computer or otherwise reload the udev rules (e.g., sudo service udev reload) Then, unplug the device, plug it in again, and see if it is detected Chapter 3 Your First Android Project Now that you have the Android . Location-Based Services 45 7 ■Chapter 40 : Mapping with MapView and MapActivity 46 3 ■Chapter 41 : Handling Telephone Calls 47 7 ■Chapter 42 : Fonts 48 1 ■Chapter 43 : More Development Tools 48 7 Part VII:. 505 ■Chapter 44 : The Role of Alternative Environments 507 ■Chapter 45 : HTML5 511 ■Chapter 46 : PhoneGap 525 ■Chapter 47 : Other Alternative Environments 543  Part VIII: The Ever-Evolving Android 549  ■Chapter. Theory 40 9 ■Chapter 36: Basic Service Patterns 41 7 ■Chapter 37: Alerting Users via Notifications 43 7 Part VI: Other Android Capabilities 44 9 ■Chapter 38: Requesting and Requiring Permissions 45 1 ■Chapter

Ngày đăng: 31/03/2014, 16:34

Từ khóa liên quan

Mục lục

  • Cover

    • Contents at a Glance

    • Contents

    • About the Author

    • About the Technical Reviewers

    • Acknowledgments

    • Preface

    • Core Concept

      • The Big Picture

        • Benefits and Drawbacks of Smartphone Programming

        • What Androids Are Made Of

        • Stuff at Your Disposal

        • The Big Picture...of This Book

        • How to Get Started

          • Step 1: Set Up Java

            • Install the JDK

            • Learn Java

            • Step 2: Install the Android SDK

              • Install the Base Tools

              • Install the SDKs and Add-ons

              • Step 3: Install the ADT for Eclipse

              • Step 4: Install Apache Ant

              • Step 5: Set Up the Emulator

              • Step 6: Set Up the Device

                • Windows

                • Mac OS X and Linux

                • Your First Android Project

                  • Step 1: Create the New Project

                    • Eclipse

Tài liệu cùng người dùng

Tài liệu liên quan