我在与Android Studio相同的计算机上安装了Team Foundation Server 2018 Express。我的项目在android studio中构建良好。但是,当我尝试从TFS构建它时,出现错误:
2018-06-27T18:07:46.5160178Z FAILURE: Build failed with an exception.
2018-06-27T18:07:46.5250007Z
2018-06-27T18:07:46.5319886Z * What went wrong:
2018-06-27T18:07:46.5374784Z A problem occurred configuring project ':androidhelper'.
2018-06-27T18:07:46.5374784Z > Failed to install the following Android SDK packages as some licences have not been accepted.
2018-06-27T18:07:46.5414710Z platforms;android-26 Android SDK Platform 26
2018-06-27T18:07:46.5444654Z build-tools;27.0.3 Android SDK Build-Tools 27.0.3
2018-06-27T18:07:46.5449640Z To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
2018-06-27T18:07:46.5464600Z Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
2018-06-27T18:07:46.5499548Z
2018-06-27T18:07:46.5514516Z Using Android SDK: C:\Users\CAA\AppData\Local\Android\sdk\platform-tools
据我所知,在检入android studio的SDK-Manager后,所有软件包都已安装:
在其他线程上,我发现使用
sdkmanager --licenses
从命令行可能会解决此问题。但是根据输出,一切都可以接受:
如何归档我的TFS来构建android项目?
更新:
我尝试过的其他事情:
答案 0 :(得分:1)
请尝试以下各项以缩小问题范围:
运行以下命令:
cd $ANDROID_HOME/tools/bin ./sdkmanager --update
%ANDROID_HOME%/tools/bin/sdkmanager --licenses
删除并重新安装:
1,删除platforms \ android-26文件夹。
2,在android-sdk \ bin中运行sdkmanager "platforms;android-26"
文件夹。
3,按y
接受许可并等待其安装。
对build-tools;27.0.3 Android SDK Build-Tools 27.0.3
从SDK-Manager卸载并重新安装
1,卸载SDK Platform 26
和Build-Tools 27.0.3
,然后在SDK-Manager中重新安装
2,运行%ANDROID_HOME%/tools/bin/sdkmanager --licenses
并接受所有许可证。
在另一台计算机上部署新代理并安装Android SDK 在上面。再试一次。