Eclipse/Android 中的可重用项目

发布于 2024-10-09 21:28:59 字数 313 浏览 0 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青衫儰鉨ミ守葔 2024-10-16 21:28:59

为您想要重用的项目创建一个库项目
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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文