Eclipse/Android 中的可重用项目
我是 Eclipse(适用于 Android)开发的新手。我多年来一直是使用 Visual Studio 的 .Net 开发人员。我很高兴现在尝试新的东西。
我刚刚开始使用 Eclipse 并成功开发了一个小型数据库应用程序。我想构建可在多个项目中使用的可重用组件。在 Visual Studio 中,我构建一个新项目并在其他项目中“引用”它们。这样,对组件的更改就会反映在所有引用项目中。
有没有办法在 Eclipse 中做类似的事情?我不想将 .java 文件包含在我的项目中,而是希望它们位于单独的项目中。我还在寻找在 Eclipse/Java 世界中执行此操作的最佳实践。
I'm new to development on Eclipse (for Android). I have been a .Net developer using Visual Studio for YEARS now. I'm excited to now try something new.
I have just started working on Eclipse and managed to develop a small database application. I want to build reusable components which I can use across multiple projects. In Visual Studio, I build a new project and "reference" them in other projects. This way changes to the components get reflected in all referencing projects.
Is there a way to do a similar thing in Eclipse? I don't want to include the .java files in my project, rather I want them to be in a separate project. I'm also looking for the best practices to do this in the Eclipse/Java world.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为您想要重用的项目创建一个库项目。
https://developer.android.com/studio/tools/sdk/ eclipse-adt.html
更新:现在不支持Eclipse,这里是Android Studio 的文档。
Create a library project for the one you want to reuse.
https://developer.android.com/studio/tools/sdk/eclipse-adt.html
Update: Eclipse is not supported now, here are the docs for Android Studio.