tfs - Build Android apps on TFS 2017 using Android Studio OpenJDK?
问题描述
I want to build Android apps on a local TFS 2017 build agent - local TFS 2017 server also.
Android Studio now contains OpenJDK but I couldn't get the TFS 2017 Gradle task to work without installing Oracle's JDK. I tried creating a JAVA_HOME environment variable, using the set JAVA_HOME by JDK version in the TFS Gradle task, and the set JAVA_HOME by path in the TFS Gradle task.
Looks like having Oracle's JDK is the standard for TFS (it's installed on Microsoft's hosted build agents) but I'd like to do without because of the incoming JDK 8 licensing change.
解决方案
Unfortunately you have to install the Oracle's JDK first if you are using windows build agent, it's one of the prerequisites.
Before you set up Android Studio, be sure you have installed JDK 7 or later. The Java Runtime Environment (JRE) alone is not sufficient.
Even with the Linux agent, when you running OpenJDK, the installer will tells
"SYSTEM HEALTH OpenJDK shows intermitten performance and UI issues. We recommend using the Oracle JRE/JDK
" Reference this similar thread: Can Android Studio use OpenJDK or does it require Oracle JDK on Linux?
More information you can reference below articles:
推荐阅读
- django - 用等效+装饰子类替换 Django 模型类的正确方法
- java - 读取文件后如何创建队列?
- php - foreach in foreach in if blade php
- php - Issue with defining the path of upload in php
- syntax - is it possible that compiled languages (C#, Java) to benefit indentions as a code block indication like python?
- reactjs - 使用模式框在 React 中编辑项目后重新加载列表 - 将功能从一个组件传递到另一个组件
- python - ValueError: invalid literal for int() with base 10: '40 1 3 4 20\n'
- python - 在 Django 的 ORM 中使用带有 UPDATE 的子查询
- javascript - 对合成 onwheel 事件做出反应的上下文 api 状态不持久
- java - 我不明白为什么这个 Java 问题中变量结果的值不为零