Home  >  Q&A  >  body text

android - Where should this command (./gradlew assembleDebug --debug) be executed?

I have encountered some problems more than once and need to perform operations similar to ./gradlew assembleDebug --debug, but I don’t know where I need to enter this string of similar commands, and there are no results when I try to search. , should be a very simple question, but I'm stuck here.

Running https://github.com/googlesamp...

today

googlesanples Another problem occurred when remote dependencies could not be pulled (trying to pull over the wall had no effect), see issue Someone replied and asked for an output, and this appeared again Command./gradlew assembleDebug --debug
But I really don’t understand where this string of commands needs to be entered before there will be a response.

I tried typing in the terminal of AS but it prompted

'/gradlew' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

Later I found gradlew.bat under the project, ran it and downloaded something, and found that demo can be compiled! I really want to know why this is, and this Where should the string command be entered? Is there something missing in my environment?

Thanks!

PHP中文网PHP中文网2728 days ago1179

reply all(2)I'll reply

  • 迷茫

    迷茫2017-05-24 11:40:00

    lovexiaov commented 5 minutes ago
    @pdog18 Are you using a windows system~~~ If so, you should execute gradlew assembleDebug --debug

    in the project root directory

    windows 系统在根目录输入gradlew assembleDebug --debug That’s it!~~~~

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-24 11:40:00

    If you want to package with commands, you must first configure the gradle environment variables. There are many tutorials after searching, which are similar to the java environment variables.
    Then you must ensure that the gradle environment version you configure (the one in the AS directory)
    and the gradle version of the project (project gradle/wrapper/gradle-wrapper.properties)
    The two versions are consistent
    Then you can open cmd in the project root directory and enter the command
    You can also enter the command in the terminal of the AS project window

    As for the build that comes with AS, it has special internal processing so it does not need to have the same version

    reply
    0
  • Cancelreply