作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 Eclipse。我已经按照多个教程在我的 android 项目上设置 ksoap。 ksoap2 jar 文件包含在我的构建路径中。本教程包括以下几行。
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope = new SoapSerializaionEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
SoapObject 带有红色下划线,当我将鼠标悬停在它上面时,系统不会提示我选择导入它。创建类、创建接口(interface)等都是选项。
非常感谢任何帮助。
最佳答案
我将 jars 复制到我项目的 libs 文件夹中。如果不存在,请创建 libs 目录。进入 Eclipse 选择您的项目,右键单击/刷新(F5 有效?)。您会在文件面板中看到 lib 文件夹。
一旦 lib 显示在您的项目中,进入项目->属性->java 构建路径 [添加 jars]。您应该会在该文件夹中看到带有 jar 的 lib 文件夹。选择它,你应该会很好。
设置完成后,项目应该可以看到它...尝试使用 clean。
关于android - 如何在 android 项目中导入 jar?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10020740/
我是一名优秀的程序员,十分优秀!