How to import Android Studio Project from Git
android, android-gradle-plugin, android-studio, github
Solution
Use import and delete "/gradle" out of your .gitignore Its ok to ignore .gradle, but /gradle should be included in the git.
At least this is the way i got it working for me.
Problem
I have and android studio project that I have checked into git. My git ignore file looks like: ``` # built application files *.apk *.ap_ # files for the dex VM *.dex # Java class files *.class # generated files bin/ gen/ # Local configuration file (sdk path, etc) local.properties # Eclipse project files .classpath .project # Proguard folder generated by Eclipse proguard/ # Intellij project files *.iws .idea/workspace.xml .idea/tasks.xml /gradle ``` When I go to my laptop to pull the project down I am not sure whether I should do open or import inside android studio to correctly being in the project. When I do open I get the following error: ``` Cannot load module file 'D:\dev\android\projects\projectname\ProjectName.iml': File D:\dev\android\projects\projectname\ProjectName.iml does not exist ``` Even though that file does exist. When I do import instead of open android studio asks for the path to gradle home and I am not sure what to put in. I am using android studio 0.4.3. Any help would be really appreciated. Answer: I was able to get the project to build by doing open instead of import. However in the process intellij created an additional iml file at the root of my project which doesn't exist on my desktop. Not sure why it was created and if I need it. Can't for the life of me figure out the proper way to push my project into git and then restore it on another machine without causing lots of new files to be generated and break things.