使用不同的包名称克隆应用程序
我已经找到了这个问题的答案,这可能是一个初学者的问题。我是一名初级 Android 程序员,并且创建了迄今为止最长的代码源。一项活动大约有 550 行。
我已将此应用程序构建为我正在创建的完整应用程序的试用/限制版本。两个版本之间的差异是 5 行代码。
有没有办法用不同的包名称克隆第一个应用程序?我可以将源复制并粘贴到工作区中,这将创建另一个具有相同包名称的源。
必须有一种比创建新项目、复制和粘贴所有代码、重新创建所有图像和图标更快的方法。或者我认为有。
I have searched for an answer to this, and it is probably a beginner question. I am a beginning android programmer and have created my longest code source to date. Approximately 550 lines in one activity.
I have built this app as a trial/limited version of a full app that I am creating. The difference between the two builds are 5 lines of code.
Is there a way to clone the first app with a different package name? I can copy and paste the source in the workspace, and this creates another source with the same package name.
There has to be a faster way than creating a new project and copying and pasting all the code, recreating all the images and icons. Or I would think there was.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
创建一个库项目,然后让两个单独的项目都使用它。这是一个参考,这是谷歌建议的库项目的用途之一 http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject
Make a library project then have your two separate projects both use it. Here is a reference, this is one of the uses google suggests for a library project http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject
您是否更改了
manifest
文件中的包。更改包名称没有问题,直到您更改了引用的所有位置(主要是清单文件)。Did you changed your package in your
manifest
file. No problem to change package name until you changed everywhere it is referred, mainly manifest file.