thyrlian / AndroidSDK

🐳 Full-fledged Android SDK Docker Image
Apache License 2.0
1.25k stars 219 forks source link

Use an error in the Jenkins Pipeline #48

Closed DreamPWJ closed 3 years ago

DreamPWJ commented 3 years ago
        docker {
                        // android sdk环境  构建完成自动删除容器
                        image "thyrlian/android-sdk:latest"
                        // 缓存gradle工具  :ro或者 :rw 前者表示容器只读,后者表示容器对数据卷是可读可写的。默认情况下是可读可写的
                        args " -v /var/cache/gradle:/root/.gradle:rw -v /my/android/sdk:/opt/android-sdk:ro "
                        reuseNode true // 使用根节点
                    }

13:49:49 Warning: License for package Android SDK Platform 28 not accepted. 13:49:49
13:49:49 FAILURE: Build failed with an exception. 13:49:49
13:49:49 * What went wrong: 13:49:49 Could not determine the dependencies of task ':accesscontrol:compileReleaseJavaWithJavac'. 13:49:49 > Failed to install the following Android SDK packages as some licences have not been accepted. 13:49:49 patcher;v4 SDK Patch Applier v4 13:49:49 build-tools;28.0.3 Android SDK Build-Tools 28.0.3 13:49:49 platform-tools Android SDK Platform-Tools 13:49:49 tools Android SDK Tools 13:49:49 platforms;android-28 Android SDK Platform 28 13:49:49 emulator Android Emulator 13:49:49 To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. 13:49:49 Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html 13:49:49
13:49:49 Using Android SDK: /opt/android-sdk

DreamPWJ commented 3 years ago

-v /my/android/sdk:/opt/android-sdk:ro not work

thyrlian commented 3 years ago

There are two things according to your log: