NotificationManagerCompat不能得到解决 - Android Wear [英] NotificationManagerCompat Can't be resolved - Android Wear

查看:911
本文介绍了NotificationManagerCompat不能得到解决 - Android Wear的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我敢肯定,我只是错过了一些东西很明显,但我在哪里找解决这个损失。
我想开始使用Android的磨损,是跟着rel=\"nofollow\">此页面上
但是我找不到哪个库我需要包括或从哪里得到他们的任何信息。
我使用Eclipse和已经使用了Android SDK管理器来下载Android Wear系统映像(虽然我有一个G-观看测试它)和所有4.4W的东西,我设置的项目,以建立针对4.4 W¯¯但我仍然得到以下错误

 进口android.support.v4.app.NotificationManagerCompat不能得到解决
进口android.support.v4.app.NotificationCompat.WearableExtender不能得到解决

我已经包含了Android的支持 - v4.jar和 android.support.v4.app.NotificationCompat 找到好了,但我看不到任何地方的Android Wear的文档,它说,我能得到这个库,它的驾驶我坚果。
如果有人能在正确的方向指向我,将是巨大的。

感谢


解决方案

  

有在支持库没有android.support.v4.app.NotificationManagerCompat。


有在当前之一。检查我的 Android的支持 - v4.jar 显示了这个类。请确保您有最新版本的JAR文件下载到你的机器(从SDK管理器),并在您的项目(例如,复制到库/ $ SDK /演员/安卓/支持/ V4 / ,其中 $ SDK 是无论是安装在Android SDK)。

I'm sure I've just missed something obvious, but I'm at a loss of where to look to solve this. I'm trying to get started with android wear, and am following the tutorial on this page. However I can't find any information about which libraries I need to include or where to get them from. I'm using eclipse and have used the Android SDK manager to download the Android Wear System Image (although I have a G-Watch to test it on) and all the 4.4W stuff, and I've set the project to build against 4.4W but I still get the following error

The import android.support.v4.app.NotificationManagerCompat cannot be resolved
The import android.support.v4.app.NotificationCompat.WearableExtender cannot be resolved

I have the android-support-v4.jar included and android.support.v4.app.NotificationCompat is found OK, but I can't see anywhere in the android wear docs that it says I can get this library and it's driving me nuts. If someone could point me in the right direction that would be great.

Thanks

解决方案

There is no android.support.v4.app.NotificationManagerCompat in the support library.

There is in the current one. Examining my android-support-v4.jar shows this class. Make sure that you have the latest version of this JAR downloaded to your machine (from the SDK Manager) and in your project (e.g., copied to libs/ from $SDK/extras/android/support/v4/, where $SDK is wherever your Android SDK is installed).

这篇关于NotificationManagerCompat不能得到解决 - Android Wear的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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