Jenkins打包安卓时提示没同意constraintLayout的license的解决方法

时间:2022-03-09 22:08:00

使用Jenkins打包安卓项目时,报错并失败,错误信息:

You have not accepted the license agreements of the following SDK components:
[ConstraintLayout for Android 1.0.0-alpha9, Solver for ConstraintLayout 1.0.0-alpha9].

 

开始以为是没装组件的原因,但是在android studio中安装了这两个组件依旧报这个错误。

解决方法:

到android sdk安装目录的tools/bin文件夹下,执行./sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2"

问题解决