开发者

The import com.google cannot be resolved?

开发者 https://www.devze.com 2023-03-23 05:04 出处:网络
I am using a tutorial at this page: http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html

I am using a tutorial at this page: 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.g开发者_开发问答oogle cannot be resolved"

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? Because I have a java file that is Web.SMS.C2DMessaging.


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

The import com.google cannot be resolved?

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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号