android - 无法通过 Android Studio 3.0 项目结构搜索依赖项

标签 android android-studio jetbrains-ide android-studio-3.0

当我尝试通过 Android Studio 3.0 添加库时,我使用的是 Android Studio 3.0

project structure -> dependencies -> library dependency

我的 Android Studio 是这样的:

enter image description here

最佳答案

如果你写下一个完全限定的依赖

(像这样):com.facebook.stetho:stetho:1.5.0

当按下 enter 键或单击“确定”-cta 后,您再次单击“确定”,

然后工作室会将依赖项添加到您的 build.gradle 文件中。 同步您的项目,仅此而已。

您可以在添加新依赖项之前修改范围。 使用 implementation/annoitationProcessor/compileOnly/等。正如预期的那样。 ( https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#new_configurations )

但是,我认为直接处理(添加和删除)build.gradle 文件中的所有依赖项并使用此窗口仔细检查已使用的依赖项是更好的方法。

希望对你有帮助

关于android - 无法通过 Android Studio 3.0 项目结构搜索依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47503170/

相关文章:

git - 如何在 merge 操作中恢复某个特定文件的 'Resolve Conflict'?

android - 我想在Android中制作一个简单的YouTube播放器,但官方示例不起作用。我迷路了,我应该从哪里开始?

java - Android - 计算 FFT 后频率不正确

android-studio - 无法将参数类型 'Future<int>'分配给参数类型 'int'

android - android studio无限启动(Gradle : Resolve dependencies ':app:_debugCompile' )

git - 将 TeamCity VCS 提交转换为修改 ID

Android 2.3.4 电话管理器

android - Ubuntu android studio安装错误

java - 在水平 ScrollView 中添加许多图像?

typescript - WebStorm、PHPStorm、Jetbrains IDE——忽略 Typescript 项目中的 JS 和 MAP 文件