Android Studio-如何在单个窗口中打开多个项目? [英] Android Studio - How to open multiple project in single window?

查看:892
本文介绍了Android Studio-如何在单个窗口中打开多个项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了Android Studio,并开始将其用于Android开发.

I have downloaded Android Studio and started using it for my Android development.

我需要知道如何在Eclipse之类的单个窗口中打开多个项目.希望有所帮助,谢谢.

I need to know, how to open multiple number of projects in a single window like Eclipse. Expecting some help, thanks.

推荐答案

在Android Studio/IntelliJ IDEA中无法在单个窗口中打开两个项目.因此,当您打开第二个项目时,您必须决定:

Open two projects in a single window is not possible in Android Studio / IntelliJ IDEA. So, when you open a second project, you'll have to decide:

可以在新窗口中打开新项目,也可以在现有窗口中替换项目. 您想如何打开该项目?

New projects can either be opened in a new window or replace the project in the existing window. How would you like to open the project?

此限制很有用,因为您的窗口提供了项目特定的功能,例如VCS信息的更改"选项卡等.

This limitation is useful because your window offers project specific features, like the Changes tab for VCS information, etc.

现在,您可以将库项目复制到项目文件夹中,并将其声明为模块依赖项.如果在不同的项目中使用相同的库,最终将导致多次获得代码.

For now, you can copy the library project into your project folder and declare it as a module dependency. If you use the same libraries in different projects, you will end up having the code multiple times.

ProjectA                   ProjectB
 facebook-sdk/              actionbarsherlock/
 actionbarsherlock/         bin/
 bin/                       src/
 src/                       ...
 AndroidManifest.xml

尽管这带来了一些不便,但它有助于在VCS中拥有所有必需的来源.很快,Gradle 新的构建系统将轻松管理这些依赖项.这是一个示例示例,说明Gradle构建可能包含ActionBarSherlock或类似的库:

While this feels kind of inconvenient, it helps having all the required sources in VCS. Soon, Gradle, the new build system, will manage these dependencies pleasantly. Here's an example of how the Gradle build could look like to include ActionBarSherlock or similar libs:

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.actionbarsherlock:library:4.2.0'
}

此答案中,您会找到一些导致该解决方案无法使用的原因.

In this answer you'll find some reasons why this solution does not work yet.

这篇关于Android Studio-如何在单个窗口中打开多个项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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