如何移动和重命名在Android Studio中的一个项目? [英] How to move and rename a project in android studio?

查看:268
本文介绍了如何移动和重命名在Android Studio中的一个项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这应该是一个非常简单的问题:)

This should be a really simple question :)

我有正常工作的项目。现在我想将其重命名并更改projectfolder的路径。首先,它seemd简单:右键 - >移动和重构/重命名。

I have a project that works fine. Now I wanted to rename it and to change the path of the projectfolder. First it seemd simple: right click -> "move" and "refactor/rename".

移动和重命名我的项目文件夹,我的apk MODUL后,有像以前那样是不一样的项目structur。我的项目库已包含了两次。
我看着在.iml文件,看到previous路径包括 - 所以我改变这一点。在此之后,我可以编译我的项目,通过命令行而不是使用IDE。在那里,我得到这个错误:

After moving and renaming my project folder and my apk modul there was not the same project-structur as before. My project libs have been included twice. I looked in the '.iml' files and saw that the previous path was included - so I changed this. After this I could compile my project over the command line but not with the IDE. There I got this error:

NullPointerException: no project directory specified

请告诉我的默认方式为移动和重命名一个项目?
我通过一个新的项目,并复制所有文件解决我的问题,但它是非常酷知道这个问题。

Whats the default way to move and rename a project? I solved my problem by making a new project and copying all files, but it would be very cool to know the solution of this "problem".

编辑:

原产项目-结构:

MyProject
--- libraries
--- MyApp

移动后:

MyProject
--- MyProject (new path)
--- MyProject (old path)

我想我要做的不仅仅是复制该项目。不知怎的,我必须指定新项目,没有带我?

I think I have to do more than just copy the project. Somehow I have to specify the "new" project, havn't I?

推荐答案

关闭Android Studio中的项目(File - >关闭项目)。移动项目,并通过移动主文件夹/目录重新命名。从Android的Studio中打开新项目(文件 - >打开)

Close the project in Android Studio (File -> Close Project). Move the project and rename it by moving its home folder/directory. Open the new project from Android Studio (File -> Open)

这篇关于如何移动和重命名在Android Studio中的一个项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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