什么是机器人工作室IML文件? [英] What are iml files in Android Studio?

查看:226
本文介绍了什么是机器人工作室IML文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是机器人Studio项目IML文件?我看,这是对模块的配置文件。我不明白它是如何工作的,我不能只用摇篮脚本与您添加到项目的外部模块集成。

此外,大多数的AS生成它们的时间,所以我无法控制的项目的行为。如果我有一个团队,在不同的IDE如Eclipse和AS的工作原理,是有可能建立我的项目,所以它的IDE不可知?

我不完全理解这个系统是如何工作的。

解决方案
  

什么是机器人Studio项目IML文件?

IML文件谷歌搜索变成了:

  

IML是IntelliJ IDEA的,用来开发Java应用程序的IDE中创建一个模块文件。它存储了有关开发模块,它可能是Java,插件,Android或Maven的组件信息;节省了模块路径,依赖关系和其他设置。

(从此页面

  

为什么不使用摇篮脚本与您添加到项目的外部模块集成。

您做用摇篮的脚本与外部模块集成,或者你自己的模块。

不过,摇篮不是IntelliJ IDEA的本土项目模型—这是分开的,在 .iml 文件和 .idea / 目录中的元数据持有。在机器人工作室,这些东西主要是产生出来的摇篮构建脚本,这就是为什么你有时会提示有摇篮的文件同步工程当你改变,比如 build.gradle 。这也是为什么你不烦投入的版本控制 .iml 文件或 .idea / ,因为它们的内容将被重新生成。

  

如果我有工作在不同的IDE像Eclipse和如何使项目IDE不可知一个团队?

要在很大程度上,你不能。

欢迎您有使用Eclipse风格的目录结构(例如,资源和体现在项目的根目录)的Andr​​oid项目。你可以教摇篮,通过 build.gradle ,如何找到在该结构中的文件。但是,其他的元数据( compileSdkVersion ,相关性等)几乎不会那样容易复制。

其他替代方案包括:

  • 移至大家转移到另一个编译系统,类似Maven,即同样集成(或没有,这取决于你的观点),以Eclipse和Android的工作室

  • 。希望 Andmore 起飞不久,所以也许你可以有一个Eclipse IDE,可以从摇篮构建Android项目生成脚本

  • 让每个人都使用一个IDE

What are iml files in Android Studio project? I read that it is configuration file for modules. I do not understand how it works, and can't I just use gradle scripts to integrate with external modules that you add to your project.

Also, most of the time AS generates them, so I cannot control project behaviour. If I have a team that works in different IDE's like Eclipse and AS, is it possible to setup my project so it's IDE agnostic?

I don't fully understand how this system works.

解决方案

What are iml files in Android Studio project?

A Google search on iml file turns up:

IML is a module file created by IntelliJ IDEA, an IDE used to develop Java applications. It stores information about a development module, which may be a Java, Plugin, Android, or Maven component; saves the module paths, dependencies, and other settings.

(from this page)

why not to use gradle scripts to integrate with external modules that you add to your project.

You do "use gradle scripts to integrate with external modules", or your own modules.

However, Gradle is not IntelliJ IDEA's native project model — that is separate, held in .iml files and the metadata in .idea/ directories. In Android Studio, that stuff is largely generated out of the Gradle build scripts, which is why you are sometimes prompted to "sync project with Gradle files" when you change files like build.gradle. This is also why you don't bother putting .iml files or .idea/ in version control, as their contents will be regenerated.

If I have a team that work in different IDE's like Eclipse and AS how to make project IDE agnostic?

To a large extent, you can't.

You are welcome to have an Android project that uses the Eclipse-style directory structure (e.g., resources and manifest in the project root directory). You can teach Gradle, via build.gradle, how to find files in that structure. However, other metadata (compileSdkVersion, dependencies, etc.) will not be nearly as easily replicated.

Other alternatives include:

  • Move everybody over to another build system, like Maven, that is equally integrated (or not, depending upon your perspective) to both Eclipse and Android Studio

  • Hope that Andmore takes off soon, so that perhaps you can have an Eclipse IDE that can build Android projects from Gradle build scripts

  • Have everyone use one IDE

这篇关于什么是机器人工作室IML文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆