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

前端之家收集整理的这篇文章主要介绍了是否可以为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.f2er.com/iOS/328971.html

猜你在找的iOS相关文章