设置 TeamCity 构建 Android Studio 项目 [英] Setting up TeamCity to build Android Studio project

查看:51
本文介绍了设置 TeamCity 构建 Android Studio 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一生都无法在互联网上找到任何关于如何设置 TeamCity 以构建 Android Studio 项目的参考.

I cannot for the life of me find any reference on the internet for how to setup TeamCity to build Android Studio projects.

我找到了 IntelliJ Idea 和 TeamCity 的链接,Gradle 和 TeamCity,但没有特别说明在 TeamCity 中构建 Android Studio 项目.

I've found links to IntelliJ Idea and TeamCity, to Gradle and TeamCity, but nothing specifically on building an Android Studio project in TeamCity.

谁能指出我正确的方向?

Can anyone point me in the right direction?

推荐答案

多亏了 Yole 的指导,我现在已经设置好了.

Thanks to Yole's direction, I've set this up now.

如果有人感兴趣,步骤如下:

The steps if anyone is interested are below:

  1. 在构建代理服务器上安装 Gradle.我从 http://gradle.org/downloads 中取出 gradle-2.3.bin 并复制到 C:\gradle-2.3
  2. 设置环境变量 GRADLE_HOME = C:\gradle-2.3
  3. 在构建代理服务器上安装 Android Studio.这也应该安装 Android SDK
  4. 设置环境变量 ANDROID_HOME = C:\Users\%Current User%\AppData\Local\Android\sdk
  5. 重启 TeamCity 代理服务器
  6. 使用 Gradle 运行器设置您的构建配置,将 Gradle 任务设置为清理构建"并设置 Gradle 主路径.将工作目录设置为您的 Android 项目的项目目录
  1. Install Gradle on the build agent server. I took the gradle-2.3.bin from http://gradle.org/downloads and copied to C:\gradle-2.3
  2. Set the environment variable GRADLE_HOME = C:\gradle-2.3
  3. Install Android Studio on the build agent server. This should also install the Android SDK
  4. Set the environment variable ANDROID_HOME = C:\Users\%Current User%\AppData\Local\Android\sdk
  5. Restart the TeamCity agent server
  6. Setup your build configuration with the Gradle runner, setting Gradle tasks to 'clean build' and setting the Gradle Home path. Set working directory to the project directory for your Android project

运行构建!

这篇关于设置 TeamCity 构建 Android Studio 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆