Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import an existing project from GitHub into Android Studio

I've just imported EdgeEffectOverride project from Github into Android Studio. This is the screen shot
enter image description here

When I run the project, I get the error: Error running build: Module 'EdgeEffectOverride-master' is not backed by gradle.

like image 792
Huy Duong Tu Avatar asked Aug 17 '14 10:08

Huy Duong Tu


People also ask

How do I add an existing project to Android Studio?

Launch Android Studio, and click File > New > Import Project. Locate your project directory, click the build. gradle file you created above to select it, and then click OK to import your project.

How do I copy a project from GitHub to Android Studio in Terminal?

On github web, go to the repo you want yo clone and click on the download button (code) then copy the url where it says clone with https. In Android Studio 4.0, go to VCS (if you've added a github plugin) then click on Get From Version Control, it will load a window where you'll paste in the url you got from github.

Can I use GitHub Library in Android Studio?

Create a GitHub account. Select 'Checkout from Version Control' from Android Studio's 'Welcome' screen. Enter your GitHub credentials. Open your web browser, navigate to the GitHub repository you want to clone, and then copy/paste its URL into the Android Studio dialog.


2 Answers

You can directly import github projects into Android Studio. File -> New -> Project from Version Control -> GitHub. Then enter your github username and password.Select the repository and hit clone.

The github repo will be created as a new project in android studio.

like image 143
Siva Prakash Avatar answered Sep 19 '22 11:09

Siva Prakash


Unzip the github project to a folder. Open Android Studio. Go to File -> New -> Import Project. Then choose the specific project you want to import and then click Next->Finish. It will build the Gradle automatically and'll be ready for you to use.

P.S: In some versions of Android Studio a certain error occurs-
error:package android.support.v4.app does not exist.
To fix it go to Gradle Scripts->build.gradle(Module:app) and the add the dependecies:

dependencies {           compile fileTree(dir: 'libs', include: ['*.jar'])       compile 'com.android.support:appcompat-v7:21.0.3'   } 

Enjoy working in Android Studio

like image 27
Priyanshu Sekhar Avatar answered Sep 23 '22 11:09

Priyanshu Sekhar