建立两个版本的相同的Andr​​oid应用程序,并同时安装在同一台设备 [英] build two version of same android app and install both on same device

查看:115
本文介绍了建立两个版本的相同的Andr​​oid应用程序,并同时安装在同一台设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要建立两个版本的相同的Andr​​oid应用程序,并在同一台设备同时安装,我可以保持两个不同的项目(不同的包名)做到这一点,但它的痛苦全来管理,而不是保持两个项目是有没有更好的方法来实现这一目标。

I need to build two version of same android app and install both on same device, i can achieve this by keeping two different projects (different package name),but it's pain full to manage both, rather than keeping two projects is there any better way to achieve this.

山姆。

推荐答案

您可以使用图书馆,但你需要调整你的code颇有几分才能做到这一点。

You can use a library, but you'll need to restructure your code quite a bit in order to do it.

基本上,编写特定的一个应用程序中的code在一个项目中,而具体在另一个项目的另一个应用程序中的code然后写code,多数民众赞成在这两个应用程序相同的库和参考吧。

Basically, write the code specific for one app in one project, and the code specific for another app in another project then write the code thats the same across both apps in a library and reference it.

我可以问你这样做了,虽然?如果你这样做了免费版本的应用程序和有偿的版本也有一些其他选择。像制作一个虚拟应用程序,并检查它的presence在主应用程序。

Can I ask what your doing this for though? If your doing a "free" version of your app and a "paid" version there are a few other options as well. Like making a dummy app and checking for it's presence in the main app.

这篇关于建立两个版本的相同的Andr​​oid应用程序,并同时安装在同一台设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆