在Android上使用socket.io客户端库

时间:2014-07-28 12:38:25

标签: android eclipse

我想在我的Android应用程序中使用这个库:

https://github.com/Gottox/socket.io-java-client

但我不知道如何将库导入我的应用程序。你可以解释一下吗?

(我正在使用eclipse)

1 个答案:

答案 0 :(得分:1)

您可以右键单击project -> properties -> Android -> Add。 在那里你可以添加库。

enter image description here

注意:不应该有另一个具有相同名称的项目(可能是您的库)           工作区。

同时检查 - How to include GitHub library to your existing Android project in eclipse

<强>更新

  

我将这些文件复制到了libs文件夹中。但仍未显示在列表中。

详细导入库项目的步骤 -

  • 从中下载项目 https://github.com/Gottox/socket.io-java-client
  • 将项目解压缩到当前工作区 应用程序工作区是。
  • 在eclipse中导入项目。
  • 右键单击该项目,然后转到project -> properties -> Android
  • 勾选Is Library
  • 的复选框
  • 转到eclipse中的应用程序。
  • 右键点击application -> properties -> Android -> Add
  • 现在,您将在列表中看到可以添加项目的项目。