简体   繁体   中英

How to run gradle commands in Android Studio terminal?

I am having dependency conflict in my project. So, I want to see the dependency tree first. But commands are not working. I am using windows operating system. Is there any settings option I need to change? Or use any plugin to observe dependency conflict?

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
    }

}

终端命令

If you are a windows users then in terminal type gradlew task-name if your are mac user the type./gradlew task-name

task name maybe of your requirement like if you want to debug then taskname will be assembleDebug or if you need to install the apk on to emulator the it would be installDebug

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM