java 导入 com.google.android.gcm.GCMRegistrar;
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14932296/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
importing com.google.android.gcm.GCMRegistrar;
提问by Imri Persiado
I'm trying to create GCM based application. I followed the instructions as described in here.
我正在尝试创建基于 GCM 的应用程序。我按照此处所述的说明进行操作。
In step number 4 I need to import the following line:
在第 4 步中,我需要导入以下行:
import com.google.android.gcm.GCMRegistrar;
But I get an error:
但我收到一个错误:
As I said I followed all the steps, any idea why did it happend?
正如我所说,我遵循了所有步骤,知道为什么会发生这种情况吗?
回答by Rais Alam
Follow below steps
按照以下步骤操作
- create a lib folder under the project
- put all jar files in lib folder
- expand lib folder select all jars
- right click then buildpath and select add to build path option
- 在项目下创建一个lib文件夹
- 将所有 jar 文件放在 lib 文件夹中
- 展开 lib 文件夹选择所有 jars
- 右键单击然后构建路径并选择添加到构建路径选项
回答by mtk
Right click the project and Add to build path-
右键单击项目并添加以构建路径-