Import from github to android studio
Step 1: Download Zip. Don't Fork the project or use git command or VCS in android studio.
Step 2: Open Android Studio->New Project->Open->Select android directory.
Step 3: Android Studio tells you this is a eclipse project (Convert it to gradle blah blah). Hit Next. This is the time I came to know this is an eclipse project and why android studio is not detecting it.
Step 4: Done.
PS: Thanks to comments(Comment Author has deleted his comment).
How to re-import an existing project from github into Android Studio? I don't want to keep local changes
Git is simply saying that a directory with the name of the project you want to clone and import already exists. It's not asking for confirmation, it is simply refusing to clone it to the location of your choice. You have at least two options to deal with this:
- Delete (or alternatively rename) the existing directory so that Git can clone the repo anew
Reset the repository so that it matches the remote, discarding your changes:
git fetch origin
git reset --hard origin/master
Link to a detailed answer by Dan Moulding.
How to connect existing Android Studio project to existing Github repository
I would view this thread if you want to create a new project.
How do you synchronise projects to GitHub with Android Studio?
If this doesn't help then I would just delete your current(local) project and import from github.
http://teamtreehouse.com/library/android-tools/git/pulling-down-github-projects-to-android-studio
I would recommend staying with command line. It is great practice. View link below for more information.
https://softwareengineering.stackexchange.com/questions/173297/why-learn-git-when-there-are-gui-apps-for-github
Import Android Studio project from git into Android Studio (Gradle)
The answer is obvious when looking at the .gitignore
file of a newly created project. The build.gradle
file is and should be included in the push to the remote repo.
So the person who made the repo in my question is doing it wrong. The .gitignore
file includes:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
As seen, more files should of been uploaded to the remote repo.
Related Topics
Change Progressbar Color Through Code Only in Android
User Does Not Have Permission to Access This Object . Firebase Storage Android
Android How to Wait Until a Service Is Actually Connected
Commitallowingstateloss() in Fragment Activities
How to Hide The System/Navigation Bar in Android Ics
Android: How to Check How Much Memory Is Remaining
How to Capture Key Events from Bluetooth Headset with Android
Failed to Find Build Tools Revision 21.1.1 - Sdk Up to Date
Speechrecognizer Causes Anr... I Need Help with Android Speech API
How to Get The Time Spent on an Application in Android Programmatically
Ble Scan Is Not Working When Screen Is Off on Android 8.1.0
Items Inside Gridview Getting Repeated When Screen Scrolls