android - 如何在Android Studio终端中运行gradle命令?

标签 android kotlin gradle terminal build.gradle

我的项目中存在依赖冲突。因此,我想首先查看依赖关系树。但是命令不起作用。我正在使用windows操作系统。我需要更改任何设置选项吗?还是使用任何插件来观察依赖冲突?

buildscript {
    ext.kotlin_version = "1.3.72"
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.0.0"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        classpath 'com.google.gms:google-services:4.3.3'
        def nav_version = "2.3.0-beta01"
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

}
terminal commands

最佳答案

如果您是Windows用户,请输入终端类型
gradlew任务名称
如果您是mac用户,则类型
./gradlew任务名称
任务名称可能是您的要求,例如,如果您要调试,则任务名称将为Debug
或者,如果您需要在仿真器上安装apk,则将其安装为debug

关于android - 如何在Android Studio终端中运行gradle命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62527971/

相关文章:

android - Kotlin 序列化中的泛型产生编译时错误

android - 在 build.gradle 上设置最大 sdk 版本

eclipse - gradle:你能从命令行应用插件吗

kotlin - 为什么我不能在 Kotlin 中为 Any 分配可空类型?

java - Spring Boot 应用程序 Gradle 构建可以在本地运行,但在部署到 Heroku 时不能运行

Android-Tumblr API - 适用于 Android 的 Jumblr [OAuthConnectionException]

android - 如何禁用Android应用程序中的按钮

java - Android中解析json对象和json数组

android - Firebase 数据库安卓

java - 如何将 twitter v2 Kotlin 库添加到我的 Maven Java 代码中?