Eclipse搭建android wear环境并且新建工程

一、搭建环境

        1、将SDK升级到23

        2、建android wear模拟器

              根据以前创建模拟器的方式一样

          3、启动模拟器,这个过程有点慢,要等一下


二、创建一个helloworld   android wear工程

          1、用图说话

           一路next,就OK了

          2、创建完的工程你会发现报错,解决办法为

     进入如下的目录    /your_android_home/extras/google/m2repository/com/google/android/support/wearable/1.0.0
     你会发现跟wearable相关的一些文件。其中关键的有两个文件。“wearable-1.0.0.aar”和“wearable-1.0.0-javadoc.jar”
     将aar这个文件解压到一个指定的文件夹种,在这个文件夹种创建一个libs子文件夹,然后将classes.jar和wearalbe-1.0.0-javadoc.jar复制到libs目录中。
     接着倒入到eclipse中。并将其设置为Library

          3、代码为 





4、运行过程中遇到的错误

Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.


styles.xml 文件改为<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-compatibility can go here.  
        -->  
    </style>  


Caused by: java.lang.NoClassDefFoundError: android.support.wearable.R$styleable
    at android.support.wearable.view.WatchViewStub.<init>(WatchViewStub.java:52)
    at android.support.wearable.view.WatchViewStub.<init>(WatchViewStub.java:46)


have not included the support-wearable lib project

     

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值