简体   繁体   中英

Import Android project from Github into Android Studio

I have single Github repository containing several directories where each directory is "root" for another Android project. I need to import to AS only one of the projects. When I creating new project in AS from Github I can insert only the repository URL. So I get in the project tree in AS one module which is the Github repository with several folders each one of them assigned with different Android project. The problem is those folders are not Modules and therefore I cannot threat them as Android project.

How can I change this?

Note - I cannot make any changes in the Github structure.

Android Studio and Eclipse have different workspace.

In the Eclipse workspace you can define more projects.

In the Android Studio workspace you can define 1 project with more modules.
Each project have the build.gradle and settings.gradle files, and each module has a own build.gradle file.

In your case, in each root folder of your project you have to define some files, like build.gradle and settings.gradle in which you define the single modules used by the project.

Somenthing like this:

github repo
 root
 |---module
 |------build.gradle
 |settings.gradle
 |build.gradle

 root1
 |---module
 |------build.gradle
 |settings.gradle
 |build.gradle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM