更改包的名称以现有的PhoneGap项目 [英] Change package name to existing Phonegap projects

查看:383
本文介绍了更改包的名称以现有的PhoneGap项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个机器人的PhoneGap项目,以及IOS的PhoneGap项目。

I have an android phonegap project, and an ios phonegap project.

他们用一个给定的包名称创建的,但我现在必须改变这个包的名字。

They were created using a given package name, but I now have to change this package name.

在Android的,我觉得我必须要改变包名称清单,以及重命名/移动在src文件夹中的java文件,并改变这里面的java文件,以反映新的包名。那么干净的构建。这是否健全的权利?

In Android, I think I have to change package name in manifest, plus rename/move the java file in the src folder, and change inside this java file to reflect the new package name. Then clean and build. Does this sound right?

我也注意到在Eclipse的Andr​​oid工具选项>>重命名应用程序包,它要求一个包名。难道让所有必要的更改?

I also noticed an option in Eclipse Android Tools >> Rename Application Package, where it asks for a package name. Would it make all necessary changes?

我将如何改变包ID在X code项目,以生成项目好不好?只需编辑捆绑标识符在此票会做解释呢? <一href="http://stackoverflow.com/questions/13927433/changing-x$c$c-package-name-without-creating-and-importing-to-new-project">Changing X code封装,而无需创建和导入到新项目名称

How would I change the bundle ID in the XCode project so the project builds ok? Just edit the Bundle identifier as explained in this ticket would do? Changing xcode package name without creating and importing to new project

感谢您的帮助。

推荐答案

是的,基本上只是改变了android:包属性在你的清单,然后重构你的src /文件夹遵循相同的程序包名称

Yes, basically just change the android:package attribute in your manifest, and then refactor your src/ folders to follow that same package name.

作为一种替代方法,您可以使用Eclipse中的重命名选项,但它必须修改所有R.class进口中的的使用资源,你的java文件中的任何的。这看起来有点吓人,但应该很好地工作。

As an alternative you can use the rename option in Eclipse, but it will have to modify all of the R.class imports in any of your java files that use resources. This will look a little intimidating, but should work fine.

这篇关于更改包的名称以现有的PhoneGap项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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