微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

是否可以为Xcode Target的Android项目创建多个目标

我与iPhone Xcode Traget一起使用单个代码库来创建多个iPhone应用程序.我的问题是,是否可以为Android项目创建多个目标.如果是,是否可以使用Eclipse?

编辑:

Xcode目标:单个项目可以包含一个或多个目标,每个目标生成一个产品(应用程序).这一直只有一个项目,我们可以在其中选择特定的目标并运行所需的应用程序

iPhone对于许多产品(App1,App2,App3等)只有一个项目,现在我可以有一样的,一个Android项目和多个产品(App1,App3等)

提前致谢

解决方法

经过广泛的研究,我意识到 Android Library Project将为我的要求提供解决方

An Android library project is a development project that holds
shared Android source code and resources. Other Android application
projects can reference the library project and,at build time,include
its compiled sources in their .apk files. Multiple application
projects can reference the same library project and any single
application project can reference multiple library projects.

Note: You need SDK Tools r14 or newer to use the new library project
feature that generates each library project into its own JAR file. You
can download the tools and platforms using the Android SDK and AVD
Manager,as described in Adding SDK Components.

• If you have source code and resources that are common to multiple
Android projects,you can move them to a library project so that it is
easier to maintain across applications and versions. Here are some
common scenarios in which you Could make use of library projects:

• If you are developing multiple related applications that use some of the same components,you move the redundant components out of their respective application projects and create a single,reuseable set of the same components in a library project. If you are creating an application that exists in both free and paid versions. You move the part of the application that is common to both versions into a library project. The two dependent projects,with their different package names,will reference the library project and provide only the difference between the two application versions.

原文地址:https://www.jb51.cc/iOS/328971.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐