与Android版的gradle进口工作室项目更改的IML文件 [英] Android Studio import project with gradle changes iml files
问题描述
我有以下的条目在我的.gitignore:
I have the following entries in my .gitignore:
...
*.iml
.idea/
...
在我的git克隆一个新的回购协议(我没有在任何项目或IML .idea),我开放的Android工作室(v0.2.5),成功导入该项目并没有问题,编译。现在,如果我想编辑一些文件,是的IntelliJ显示红色波浪的事情几乎无处不在,因为它不能找到外部库。我意识到,当IML文件再生,外部库这样的补充:
After I git clone a fresh repo (I don't have any iml or .idea in the project), I open Android Studio (v0.2.5), import the project successfully and compile without issues. Now, if I want to edit some files, IntelliJ is showing the red wavy thing almost everywhere, because it can't find external libraries. I realized that when the iml files are regenerated, the external libraries are added like this:
<orderEntry type="library" exported="" scope="TEST" name="guice-3.0-no_aop" level="project" />
仅供参考,该部分的build.gradle添加外部库:
FYI, the build.gradle part to add external libraries:
...
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
...
所以,现在,如果我把项目结构弹出和测试变更范围的编译,红波消失,一切恢复正常。
So now, if I bring the Project Structure pop-up and change the scope from Test to Compile, the red waves disappear, and everything is back to normal.
我想知道这是否是我做错了就在我身边的东西,或者如果它是一个错误吗?另外,关于方法来处理IML文件(版本与否),我无法找到任何直接的答案。似乎每个人都做有自己的办法。
I'd like to know if it's something that I do wrong on my side, or if it's a bug? Also, regarding the way to handle iml files (version them or not), I couldn't find any straight answer. Everyone seem to do have their own way.
谢谢!
推荐答案
此问题是固定的,由于Android工作室v0.2.7的。
This issue is fixed, as of Android Studio v0.2.7.
这篇关于与Android版的gradle进口工作室项目更改的IML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!