首页 > 解决方案 > 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.

标签: tfs

解决方案


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:


推荐阅读