WatchViewStub.requestApplyInsets失败的NoSuchMethodError [英] WatchViewStub.requestApplyInsets fails with NoSuchMethodError

查看:1411
本文介绍了WatchViewStub.requestApplyInsets失败的NoSuchMethodError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用奇巧S5上运行简单的Andr​​oid Wear应用程序。该应用程序只是样品由Android Studio生成。当我运行的应用程序它失败:

I'm trying to run simple Android Wear app on S5 with KitKat. The app is just sample generated by Android Studio. When I run the app it fails with:

java.lang.NoSuchMethodError: android.support.wearable.view.WatchViewStub.requestApplyInsets

我已经找到了类,而且也没有 requestApplyInsets 方法确实如此。

我使用的是最新版本的可穿戴的支持库是1.0.0。

I'm using the latest version of the support library for wearable which is 1.0.0.

dependencies {
    compile 'com.google.android.support:wearable:1.0.0'
    compile 'com.google.android.gms:play-services-wearable:5.0.77'
}

是否有可能在API 19运行呢?

Is it possible to run it on API 19?

推荐答案

好吧是我的错。看起来,如果你有穿模块中的应用程序是建在默认情况下(而不是应用模块)安装。

Ok it's my fault. Looks like if you have wear module in your application it is built and installed by default (instead of app module).

要建立并安装终端Android应用程序,现在我要运行

To build and install Android app from terminal now I have to run

gradlew app:iD 

其中,应用是我平淡的Andr​​oid项目(名为移动默认情况下)。不运行它应用程序: preFIX安装穿应用

Where app is my plain Android project (named mobile by default). Running it without app: prefix installs wear app.

这篇关于WatchViewStub.requestApplyInsets失败的NoSuchMethodError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆