eclipse 复制android项目的最快方法?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5170425/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 15:53:44  来源:igfitidea点击:

Quickest way to duplicate an android project?

androideclipse

提问by Android Eve

What is the quickestway to duplicate an existing android project in the workspace, copying that project (with a new name) to the workspace as well?

在工作区中复制现有 android 项目并将该项目(使用新名称)复制到工作区的最快方法是什么?

I already have a methodto duplicate an SDK-sampleproject into workspace, but it involves an intermediate step in which project is "created from existing source" in a temporary folder which isn'tthe workspace.

我已经有了一种SDK 示例项目复制到工作区的方法,但它涉及一个中间步骤,在该步骤中,项目是在不是工作区的临时文件夹中“从现有源创建”的。

Is there a shorter way?

有没有更短的方法?

回答by Robby Pond

If you right click on a project in Project Explorer and choose copy, and then paste it into the project explorer it will give you an option to rename it. You will have to open the project you want to copyso no projects are selected in the Project Explorer.

如果您在项目资源管理器中右键单击一个项目并选择复制,然后将其粘贴到项目资源管理器中,它将为您提供重命名它的选项。您必须打开要复制的项目,以便在项目资源管理器中未选择任何项目。

EDIT: The solution is not to click outside the project but copying an opened project, as @android-eve said.

编辑:解决方案不是在项目外单击,而是复制一个打开的项目,正如@android-eve 所说。

回答by jagdtiger_jones

Here's the procedure I've been using for making a new copy of a project. It's worked fone for a large project I wanted to break down to a smaller more specialized and I also have a scene manager template that I clone from for the start of each new project. All these steps seem to work fine and it's done within Eclipse/ADT

这是我用来制作项目新副本的过程。它适用于一个大型项目,我想分解为一个更小的更专业的项目,而且我还有一个场景管理器模板,我可以从每个新项目的开始克隆它。所有这些步骤似乎都运行良好,并且是在 Eclipse/ADT 中完成的

how to clone a project and rename it. ------------------------------ open up the source project, (ie just click on it. name of project and leave it highlighted) then control-c control-v , give it a new name..note this is a TEMP name because you will have to rechange it in a second so "the copy" is just fine.

如何克隆一个项目并重命名它。------------------------------ 打开源项目,(即只需单击它。项目名称并使其突出显示) 然后 control-c control-v ,给它一个新名称..注意这是一个 TEMP 名称,因为你必须在一秒钟内重新更改它,所以“副本”就好了。

The copy should paste in place, open up the copy ,right click on top line and select "refactor--> rename--> give the new name you want to name the whole project and check "update references" if it's not already checked.

副本应粘贴到位,打开副本,右键单击顶行并选择“重构--> 重命名--> 提供您想要命名整个项目的新名称,如果尚未选中,请选中“更新引用” .

Then go into manifest and change the name there. Be sure and make the change in the "manifest" tab NOT in the xml code . and hit save icon , a pop-up will ask if you want to "update your Launch Configurations", hit "YES"

然后进入清单并在那里更改名称。确保在“清单”选项卡中进行更改,而不是在 xml 代码中。并点击保存图标,弹出窗口会询问您是否要“更新您的启动配置”,点击“是”

Click on "SRC" at the top of the package. Notice how the package name under the src folder has not changed names. right click that and select refactor>, Change the name. ... a rename menu appears, all the boxes should be checked and hit "preview" (you might get a warning it already exists...go on anyway) that should then change the package names in the individual class files. Open a few and check the top line for the package is updated. under res/values is a file strings.xml. Open it you should see this. XXXXXXXX

单击包顶部的“SRC”。请注意 src 文件夹下的包名称没有更改名称。右键单击并选择重构>,更改名称。...出现一个重命名菜单,所有的框都应该被选中并点击“预览”(你可能会收到一个警告它已经存在......无论如何继续),然后应该更改单个类文件中的包名称。打开一些并检查包的顶行是否已更新。在 res/values 下是一个文件 strings.xml。打开它你应该看到这个。XXXXXXXXX

and change the XXXXXXX part to the new name you want for your icon on the device/emulator, probably the Apps name that's it. It was such a pain to do this each time so I created my own "doc" to help. I've double checked this a few time

并将 XXXXXXX 部分更改为设备/模拟器上图标的新名称,可能就是应用程序名称。每次都这样做太痛苦了,所以我创建了自己的“文档”来提供帮助。我已经仔细检查了几次

回答by Graham P Heath

As blindstuffpointed out, but I missed because it wasn't an answer, Ctrl+C, Ctrl+V works for openprojects in Eclipse.

正如盲人指出的那样,但我错过了,因为它不是答案,Ctrl+C、Ctrl+V 适用于 Eclipse 中的开放项目。

回答by Ngo Anh Tuan-HEDSPI

It's very simple, open your project you want to copy, close all other project. Click to choose your project at project explorer, Ctr + C and Ctr + V.

很简单,打开你要复制的项目,关闭所有其他项目。单击以在项目资源管理器中选择您的项目,Ctr + C 和 Ctr + V。