Android Wear development-Getting started-Eclipse development platform Build

Source: Internet
Author: User

Development platform Configuration
  1. To download the latest version of ADT, see website: http://developer.android.com/sdk/installing/installing-adt.html. (Has been accustomed to Google to provide integrated ADT Eclipse, when I write this article to the official website query, has not found its download path, only the Android studio, so this article is only to temporarily due to the project migration cost to bring trouble to the students to read. Move to Android Studio as early as possible! )

  2. Download the necessary SDK version: Minimum 4.4w.2 (API 20), or more than 5.0. Note that it is not 4.4.2 (API 19). See for details.

    • SDK Platform: You know.

    • Samples for SDK: Highly recommended download, because some API in the official website of the Developer Guide article is not mentioned, some problem-solving ideas, can be learned from the SDK Samples.

    • 2 system Image: Recommended download, because I have only Samgsung Android Wear, no Moto 360, to multi-resolution test, or need simulator! In addition, be sure to upgrade to the latest version, the author in the development process, encountered the simulator bug: Dynamically loaded view in the Watch normal display, and the simulator fails, after the update.

    • Sources for Android SDK: you know.

  3. Upgrade Android SDK Tools: Minimum 23.0.0

  4. Download Dependent libraries:

    • Google Support Library: Provides Android.support.v4.app.NotificationCompat.WearableExtender: For the adaptation of Watch card notifications
    • Google Play Services: Providing com.google.android.gms.wearable: data transfer for mobile phones and wear

    • Google Repository: Provide android.support.wearable: Implement wear Custom interface

  5. Unzip the Wear dependent library: The downloaded package is in/sdk/extras/google/m2repository/com/google/android/support/wearable/1.0.0/wearable-1.0.0.aar. Unzip to the working directory and copy the Classes.jar inside to the Libs directory.

  6. Import wear dependent libraries: Eclipse imports the project that was unzipped in the previous step, and the project attributes properties are set to the IS library.

Create Android Wear Project



I use the ADT upgrade, still do not appear above the screen, therefore, chose the following way.

    1. Download Template project: Https://github.com/tangtungai/Android-Wear-Black-Activity-Template

    2. Eclipse Import Template Project

    3. Templates import wearable-1.0.0 dependent libraries to resolve issues that might not find the android.support.wearable package.

Note: ADT since (23.0.2) This version has no blank Wear Activity, so you have to download the template project to develop.

Create simulator

    • Device: Select a square/round unit

    • Target:4.4w.2

    • Cpu/abi: Here I choose android Wear Intel Atom (X86), because my 64-bit Ubuntu 14.04 system in the selection of Android Wear ARM (armeabi-v7a) will be an error, So in the case of not sure which image will be error, the best two download it.

    • Hardware Keyboard present: There is no keyboard input for the watch, so it seems useless here, but whether or not the voice input is relevant to be investigated.

    • Skin: Select the device corresponding to the Androidwearsquare

    • Use Host GPU: This is the key, do not tick this, when doing notification display custom activity, you will see a dark

Mobile Phone Connection Wear simulator
    1. Install the Android Wear App on your phone. Click to jump to Google Play
    2. Open the Android Wear App, turn on Bluetooth (Force need to open, although connected to the computer simulator is not required), then the upper right corner of the menu button appears, click on the Display menu "Pair with Emulator", click to select, such as

    3. In the Command Line window, enter:

      Adb-d forward tcp:5601 tcp:5601

    4. Connected successfully, you can see the offline cloud icon disappears in the upper right corner of the wear simulator

Also pointed out, the app does not read a-p-p, but read [Æp], is the abbreviation of English Word application!

Hello World

Run the program, this is a new starting point ~ ~ ~

Android Wear development-Getting started-Eclipse development platform Build

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.