重命名K9邮件包名 [英] Renaming K9 Mail package name

查看:123
本文介绍了重命名K9邮件包名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多的麻烦更名K9邮件的包名。我修改它,并希望最终把它在市场上,但我不能这样做,如果我不能重新命名它。我一直在使用的折射,并在不同的组合在Eclipse中的ADT工具尝试。我能够得到计划推出后,我用验光仪和ADT在一起,但是当我的主要活动启动外活动方案对其关闭。在折射镜我一直都选择比约为非Java文件箱等的复选框。任何人都已能够前重命名K9邮件?任何帮助将AP preciated。

I am having a lot of trouble renaming K9 mail's package name. I am modifying it and would eventually like to put it on the market but i can not do that if i cannot rename it. I have tried using refractor and the ADT tool in eclipse in different combinations. I am able to get the program to launch after i use the refractor and ADT together, but when i start activities outside the main activity the program forecloses. In refractor I have been selecting all of the check boxes other than the box about non java files. Has anyone been able to rename K9 Mail before? Any help will be appreciated.

推荐答案

有一个K9 shell脚本(这需要Perl),专门用于这一目的:工具/建造-β。应该在cygwin环境下工作,如果在Windows上。它需要更多的修改,如果改变包装的领域,也是如此。我已经将它修改为更广泛的意义上说,虽然。它使用相同的命令蚁(即SH工具/建造-β调试)中运行,并暂时命名一切,然后放回去。您需要更改的前5行,你就必须解除几行,如果改变从COM的​​TLD为EDU。下面的一切蚂蚁$ @ 相反的过程。我不知道什么日食

There's a k9 shell script (which requires perl) specifically for this purpose: tools/build-beta. should work in a cygwin environment if on windows. it requires a bit more modification if changing the domain of the package, as well. i've modified it to a more general sense, though. it runs with the same command as ant (i.e. "sh tools/build-beta debug"), and temporarily renames everything and then puts it back. you need to change the first 5 lines, and you'll need to uncomment a couple of lines if changing the TLD from com to edu. everything below ant $@ reverses the process. i don't know anything about eclipse.

另外,你可以要求我们输入您的大学作为自动配置的帐户。

alternatively, you could ask us to enter your university as an auto-configurable account.

BETA_TLD=com
BETA_DOMAIN=fsck
BETA_PROJECT=k9
BETA_PROJ_NAME=K9
BETA_APP_NAME="K9 Mail"
BETA_PACKAGE="${BETA_TLD}.${BETA_DOMAIN}.${BETA_PROJECT}"
BETA_PATH="${BETA_TLD}/${BETA_DOMAIN}/${BETA_PROJECT}"
perl -pi -e"s|\@string/app_name|$BETA_APP_NAME|g" AndroidManifest.xml
perl -pi -e"s|com/fsck/k9/R.java|$BETA_PATH/R.java|g" build.xml
perl -pi -e"s|LOG_TAG = \"k9\"|LOG_TAG = \"$BETA_PROJECT\"|" src/com/fsck/k9/K9.java
find src/com/fsck res -type f |xargs -n 1 perl -pi -e"s/com.fsck.k9(?=\W)/$BETA_PACKAGE/g"
perl -pi -e"s|com.fsck.k9|$BETA_PACKAGE|g" AndroidManifest.xml
mv src/com/fsck/k9 src/com/fsck/${BETA_PROJECT}
mv src/com/fsck src/com/${BETA_DOMAIN}
#mv src/com src/${BETA_TLD}
perl -pi -e"s|K9|$BETA_PROJ_NAME|g" build.xml
ant $@
#mv src/${BETA_TLD} src/com
mv src/com/${BETA_DOMAIN} src/com/fsck
mv src/com/fsck/${BETA_PROJECT} src/com/fsck/k9
perl -pi -e"s|$BETA_PACKAGE|com.fsck.k9|g" AndroidManifest.xml
perl -pi -e"s|$BETA_PATH/R.java|com/fsck.k9/R.java|g" build.xml
find src/com/fsck res -type f |xargs -n 1 perl -pi -e"s/$BETA_PACKAGE(?=\W)/com.fsck.k9/g"
perl -pi -e"s|LOG_TAG = \"$BETA_PROJECT\"|LOG_TAG = \"k9\"|" src/com/fsck/k9/K9.java
perl -pi -e"s|$BETA_PROJ_NAME|K9|g" build.xml
perl -pi -e"s|$BETA_APP_NAME|\@string/app_name|g" AndroidManifest.xml

这篇关于重命名K9邮件包名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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