使用本教程尝试为 Android 创建 Twitter 应用程序
我一直在尝试使用 twitter4J 和这个 tut (http://java-tutorial .ch/framework/twitter-with-java-tutorial)尝试一个简单的小应用程序。我对android的基础知识非常熟悉。我真正不明白的是我将 twitter4J 放在哪里(我猜测将整个解压文件放入项目的根目录中)以及如何让它与程序“对话”。正如 twiiter4J 所说“只需将 twitter4j-core-2.2.5.jar 添加到您的应用程序类路径中。”最后但并非最不重要的一点是教程中的这条指令“为了构建和创建我们的应用程序,我们将使用 Maven。在 Maven 中,资源位于 src/main/resources 中。”
如果有人能帮助我,那就太棒了,因为我想在今晚之前真正完成这件事,但我花了大约 4 个小时试图想出某种方法来让它发挥作用,但我就是做不到。不明白。提前致谢
I've been trying to use twitter4J and this tut (http://java-tutorial.ch/framework/twitter-with-java-tutorial) in attempting a simple little app. I'm pretty familiar with the basics of android. What I really don't understand is where I put twitter4J (I'm guessing the entire unzipped file into the root of the project) and what do to get it to "talk" with the program. As twiiter4J states "Just add twitter4j-core-2.2.5.jar to your application classpath." Last but not least is this piece of instruction from the tutorial as well "To build and create our application we will use Maven. In Maven the resources are located in src/main/resources."
If someone could help me out that would be awesome as I'm trying to really get this done by tonight, but I've spent about 4 hours trying to come up with some sort of way to get this to work and I just can't get it. Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果文件是 .ZIP 文件,那么您可能必须解压缩该文件。如果它是 .JAR 文件,那么您要做的就是将其添加到项目的构建路径中,或者将 libs 文件夹添加到项目中,然后将 JAR 放入其中,然后将其添加到项目的构建路径中。推荐方式)
在此处获取有关 MAVEN 的更多信息 http://maven.apache.org/
Well possibly you have to unzip the file if its a .ZIP file. If it is a .JAR file then all you do is add it to the build path of your project, or add a libs folder to your project and the drop the JAR into it and add it to the build path of your project.(the recommended way)
Get more info on MAVEN here http://maven.apache.org/
请参阅 Android Maven 插件 的文档来完成这一切。虽然我不得不说那个教程很糟糕..
Look at the documentation for the Android Maven Plugin to get it all going. That tutorial is pretty bad though I have to say..
http://maven.apache.org/
在 java 类路径中设置多个 jar
...
http://maven.apache.org/
Setting multiple jars in java classpath
...