Android Wear Eclipse Development Environment Setup

Source: Internet
Author: User


This article describes how to build an Android Wear development environment in eclipse.Remember, it's not as simple as you think.The following details the operation steps to ensure that you can work properly.
    1. Open your Android SDK Manager upgrade required SDK, upgrade SDK tools to 23.02 and all items under Android 4.4W, and be sure to upgrade "Google Repository" under Extra, It is recommended that you upgrade all upgrades that you can upgrade.
    2. After upgrading the SDK, we created an Android Wear emulator, with the following parameters configured as follows:

3. Then you can start the simulator and familiarize yourself with the operation of the Android Wear.

4. Next we will create an Android Wear application (the key steps below)

5. Let's start by creating an Android Wear Project

Then the next step, we choose to create a "Blank Wear Activity", if your ADT is not upgraded, you may not see this option
Then click Next. Next you will find this new project compiled does not pass??????Well, we find that there seems to be a few packages missing, where are the bags, and then the key.Enter the following directory/your_android_home/extras/google/m2repository/com/google/android/support/wearable/1.0.0You will find some documents related to wearable. Among the keys are two files."Wearable-1.0.0.aar" and "Wearable-1.0.0-javadoc.jar "Extract the Aar file into a specified folder type, create a Libs subfolder in this folder, and then copy the Classes.jar and Wearalbe-1.0.0-javadoc.jar to the Libs directory.Then pour into eclipse. and set it as the library,After pouring into Eclipse, reference the library with the Androidweartest project we created at the beginning, and you will find that the errors of the above engineering species have disappeared.Then we run the project on the simulator, and you will unfortunately find that the program crashes, prompting the following:
Java.lang.RuntimeException:Unable to start Activity componentinfo{com.curious.awtest/ Com.curious.awtest.MainActivity}: Android.util.AndroidRuntimeException:You cannot combine swipe dismissal and the Action Bar.

Encountered this error, we need to modify the Styles.xml file in our project, the default theme settings are as follows:
<style name= "Appbasetheme" parent= "Android:Theme.DeviceDefault" >        <!--            Theme customizations Available in newer API levels can go            in Res/values-vxx/styles.xml, while customizations related to            Backward-compa Tibility can go here.        -    </style>
Next, we run our project again on the simulator, this time we can run it successfully, and finally think about the following:



The resources are as follows:
https://medium.com/@tangtungai/how-to-develop-and-package-android-wear-app-using-eclipse-ef1b34126a5d
Http://stackoverflow.com/questions/24520240/import-android-support-wearable-cannot-be-resolved
Http://stackoverflow.com/questions/24471891/wear-project-attr-androidwindowswipetodismiss
Http://stackoverflow.com/questions/24567836/unable-to-execute-intial-android-wear-hello-world-app-in-eclipse

Android Wear Eclipse Development Environment Setup

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.