[英]The import com.google cannot be resolved?
I am using a tutorial at this page: http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html 我在此页面上使用教程: http : //www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html
It tells me to change the main activity, everything is going well except for this error: "The import com.google cannot be resolved" 它告诉我更改主要活动,除此错误外,其他一切都进行顺利:“导入com.google无法解析”
The line highlighted is: 突出显示的行是:
import com.google.android.c2dm.C2DMessaging;
What could be the problem? 可能是什么问题呢? Should it be my project name instead of com.google? 应该是我的项目名称而不是com.google吗? Because I have a java file that is Web.SMS.C2DMessaging. 因为我有一个Web.SMS.C2DMessaging Java文件。
Did you add c2dm.jar
to your project's build path? 您是否将c2dm.jar
添加到项目的构建路径中?
First copy the c2dm.jar
to lib
folder in your project (create one if there are none). 首先将c2dm.jar
复制到c2dm.jar
中的lib
文件夹(如果没有,则创建一个)。
1.) Right click on your project and select Properties
. 1.)右键单击您的项目,然后选择Properties
。
2.) Select Java Build Path
and select Libraries
tab. 2.)选择Java Build Path
然后选择Libraries
选项卡。
3.) Click Add External JARs...
button and choose the c2dm.jar
from lib
folder. 3.)单击Add External JARs...
按钮, c2dm.jar
从lib
文件夹中选择c2dm.jar
。
4.) Click Open
and OK
. 4.)单击Open
然后OK
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.