Development platform Configuration
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! )
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.
Upgrade Android SDK Tools: Minimum 23.0.0
Download Dependent libraries:
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.
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.
Download Template project: Https://github.com/tangtungai/Android-Wear-Black-Activity-Template
Eclipse Import Template Project
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
- Install the Android Wear App on your phone. Click to jump to Google Play
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
In the Command Line window, enter:
Adb-d forward tcp:5601 tcp:5601
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