【发布时间】:2014-02-27 18:17:33
【问题描述】:
我有一个我已经签入 git 的 android studio 项目。我的 git 忽略文件如下所示:
# 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
当我去我的笔记本电脑拉下项目时,我不确定是否应该在 android studio 中打开或导入以正确进入项目。当我打开时,我收到以下错误:
Cannot load module file 'D:\dev\android\projects\projectname\ProjectName.iml':
File D:\dev\android\projects\projectname\ProjectName.iml does not exist
即使该文件确实存在。
当我导入而不是打开 android studio 时,我会询问 gradle home 的路径,但我不确定要输入什么。我使用的是 android studio 0.4.3。
任何帮助将不胜感激。
答案:
我能够通过打开而不是导入来构建项目。然而,在这个过程中,intellij 在我的项目的根目录中创建了一个额外的 iml 文件,该文件在我的桌面上不存在。不知道为什么创建它以及是否需要它。我这辈子都想不出正确的方法将我的项目推送到 git 中,然后在另一台机器上恢复它,而不会导致生成大量新文件并破坏东西。
【问题讨论】:
-
如果你把答案写在你如何修复并接受它会更好,这样我们可以直接看解决方案
标签: android github android-studio android-gradle-plugin