如何改变的Andr​​oid应用程序包名程序包、Andr、oid

2023-09-12 00:59:22 作者:夙夜

我的密钥库已损坏,因此在Android市场被要求我重新命名的应用程序,并重新提交。但是,每当我去编辑清单和整个文件的包名,它给了错误的我吨。

什么是正确的方法来改变应用程序的名称?

谢谢!

解决方案

如果您使用的是Eclipse,你可以尝试的这些说明从Android的开发者网站。他们是专门为GestureBuilder样本,但应该适用于任何应用程序,只要我可以告诉:

  

[H] ERE是如何,你可以在Eclipse中做到这一点:

        在包名(的src / com.android.gesture.builder )右键单击。   选择重构>重命名和更改名称,例如    com.android.gestureNEW.builder 。   打开清单文件。里面的   <舱单> 标签,包装名称更改为    com.android.gestureNEW.builder 。   打开每两个活动的文件   而就按Ctrl-Shift-O组合添加缺失的导入包,然后保存每个   文件。运行在模拟器上GestureBuilder应用程序。   

另外,一定记得你要重命名的包本身以及这些文件中的引用。在Eclipse中,你可以看到包在左侧的文件浏览器窗口/树视图的名称。根据我的经验,Eclipse可以有时会有点finnicky和不可靠的本(后面流浪引用留给老包名称,例如)。

My keystore is corrupt, therefore the Android Market is requiring me to rename the app and resubmit it. However, whenever I go to edit the package names in Manifest and throughout the files, it gives me tons of errors.

What's the proper way to change the application name?

Thanks!

解决方案

If you're using Eclipse, you could try these instructions from Android's developer site. They're specifically for the GestureBuilder sample but should apply to any application as far as I can tell:

[H]ere's how you could do this in Eclipse:

Right-click on the package name (src/com.android.gesture.builder). Select Refactor > Rename and change the name, for example to com.android.gestureNEW.builder. Open the manifest file. Inside the <manifest> tag, change the package name to com.android.gestureNEW.builder. Open each of the two Activity files and do Ctrl-Shift-O to add missing import packages, then save each file. Run the GestureBuilder application on the emulator.

Also, be sure you remembered to rename the package itself along with the references to it in the files. In Eclipse you can see the name of the package in the file explorer window/tree view on the left hand side. In my experience, Eclipse can sometimes be a little finnicky and unreliable with this (leaving behind stray references to the old package name, for example).