[英]How to run a gradle project on eclipse exp project: https://github.com/nkzawa/socket.io-android-chat
Just a beginner in android, Was trying to learn Android and socket IO interaction.只是一个android初学者,正在尝试学习Android和socket IO交互。 So picked up a opensource hello world project as mentioned.
所以选择了一个开源的 hello world 项目。 But I am not getting how to run such gradle project to my virtual AVD.
但是我不知道如何将这样的 gradle 项目运行到我的虚拟 AVD。 I have eclipse and Android sdk on ubuntu 14.04.
我在 ubuntu 14.04 上有 eclipse 和 Android sdk。 Thanks
谢谢
You can generate eclipse project by using gradle eclipse plugin .您可以使用gradle eclipse plugin生成 eclipse 项目。 In your
build.gradle
,在您的
build.gradle
,
apply plugin: 'eclipse'
and with running the following gradle task,并运行以下 gradle 任务,
$ gradle eclipse
eclipse project will be generated.将生成eclipse项目。 Another solution would be just using the gradle plugin for eclipse .
另一种解决方案是仅使用eclipse的gradle 插件。
But I strongly recommend you to switch your IDE to AndroidStdio when it comes to Android development.但我强烈建议您在 Android 开发方面将您的 IDE 切换到AndroidStdio 。
I have a simple trick to import Android Studio Projects in Eclipse.我有一个简单的技巧可以在 Eclipse 中导入 Android Studio 项目。
Note: If there are any library dependencies for the project, you will have to locate it on the internet (or locate them if available in the gradle project) and copy it in the libs folder for you eclipse project.注意:如果项目有任何库依赖项,您必须在 Internet 上找到它(或者在 gradle 项目中找到它们)并将其复制到 eclipse 项目的 libs 文件夹中。 If the library is given as another project, follow the above steps again, right click on the library-project, and check the is Library option and import it as library in the application project.
如果库是作为另一个项目给出的,则再次按照上述步骤操作,在库项目上单击鼠标右键,然后选中是库选项并将其作为库导入应用程序项目中。
Hope this helped.希望这有帮助。 Cheers :)
干杯:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.