Android Studio:库项目依赖项是否从 project.properties 中选取? [英] Android Studio: Are Library Project dependencies picked from project.properties?

查看:25
本文介绍了Android Studio:库项目依赖项是否从 project.properties 中选取?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从 ADT 导入了我的项目,在转到模块设置"并编辑依赖项后,一切正常.我的build.gradle"的依赖块是空的,所以我想知道 Ansdroid-Studio 从哪里选择库依赖?当我从 Eclipse 迁移时,我在模块目录中有 project.properties 文件.Android-studio 是否从project.properties"文件中挑选这些东西?

I have imported my project from ADT and after going to "Module Settings" and editing dependencies things are working fine. My "build.gradle" has dependencies block empty, So I am wondering from where is Ansdroid-Studio picking libraries dependencies ? As I migrated from eclipse so I have project.properties file in module directory. Does Android-studio pick these things from "project.properties" file ?

推荐答案

Android Studio 的默认项目支持是通过 Gradle 完成的,除非您有来自 IntelliJ 的 Android 项目并且您也可以使用 Studio 打开.

Android Studio's default project support is done through Gradle, unless you have an Android project coming from IntelliJ which you can open with Studio as well.

如果您使用 Gradle,则完全忽略 project.properties.您现在不应使用模块设置来添加依赖项,因为它只会更改 IDE 而不会更改基于 Gradle 的构建系统(我们将在以后的版本中修复此问题).

If you use Gradle, project.properties is completely ignored. You should not use the Module Settings to add dependencies now as it only changes the IDE but not the Gradle based build system (we'll fix this in later versions).

如果您的 build.gradle 中缺少依赖项,则可能是由于从 ADT 导出的错误.我们即将对此进行修复.

If you have missing dependencies in your build.gradle, it may be due to a bug in the export from ADT. We have fixes for this coming soon.

这篇关于Android Studio:库项目依赖项是否从 project.properties 中选取?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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