git android studio project,github - How to import Android Studio Project from Git - Stack Overflow

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值