无法解析import com.google? [英] The import com.google cannot be resolved?

查看:470
本文介绍了无法解析import com.google?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这个页面上使用了一个教程:
http:// www .vogella.de / articles / AndroidCloudToDeviceMessaging / article.html

I am using a tutorial at this page: http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html

它告诉我改变主要的活动,除了这个错误,一切顺利:
无法解析import com.google

It tells me to change the main activity, everything is going well except for this error: "The import com.google cannot be resolved"

突出显示的行是:

import com.google.android.c2dm.C2DMessaging;

可能是什么问题?应该是我的项目名称而不是com.google吗?因为我有一个java文件是Web.SMS.C2DMessaging。

What could be the problem? Should it be my project name instead of com.google? Because I have a java file that is Web.SMS.C2DMessaging.

推荐答案

您是否在项目的构建路径中添加了 c2dm.jar

Did you add c2dm.jar to your project's build path?

首先将 c2dm.jar 复制到项目中的 lib 文件夹(create

First copy the c2dm.jar to lib folder in your project (create one if there are none).

1。)右键点击您的项目,然后选择属性

2.)选择 Java构建路径并选择选项卡。

3 。)单击添加外部JAR ... 按钮,然后从 lib中选择 c2dm.jar 文件夹。

4.)点击打开确定

1.) Right click on your project and select Properties.
2.) Select Java Build Path and select Libraries tab.
3.) Click Add External JARs... button and choose the c2dm.jar from lib folder.
4.) Click Open and OK.

这篇关于无法解析import com.google?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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