Automatically accept all SDK licences

后端 未结 30 2147
感情败类
感情败类 2020-11-22 16:35

Since gradle android plugins 2.2-alpha4:

Gradle will attempt to download missing SDK packages that a project depends on

Which

30条回答
  •  天涯浪人
    2020-11-22 17:23

    I finally found a solution on Windows, to have a real silent and automatic install:

    On Windows, the following syntax doesn't work:

    echo y | sdkmanager --licenses
    

    It seems the "y" aren't correctly sent to the java program called in the batch.

    The workaround is to create a file file-y.txt with several "y", one by line, and to use

    call sdkmanager --licenses < file-y.txt
    

    This will create the needed files in the licenses directory. The problem is probably related to the use of BufferedReader in Java

提交回复
热议问题