Automatically accept all SDK licences

后端 未结 30 2258
感情败类
感情败类 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:40

    We found same issue building the project on Jenkins. With buildToolsVersion '25.0.2', we must accept licenses before building. In our case, we needed to run:

    yes | sdkmanager --update that accepts licenses for the sdkmanager itself, and then

    yes | sdkmanager --licenses that accepts new licenses not previously accepted

    Remember: run these commans with the same user that jenkins does. In our Debian, the Jenkins user is just jenkins. In other words: doing it as root will create the accepted licenses as root, so Jenkins will not read them.

    By the way, we found sdkmanager at /var/lib/jenkins/tools/android-sdk/tools/bin. If yours is not there, find it with find / -name "sdkmanager"

提交回复
热议问题