Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Setup: Add information about Java and Gradle installation #772

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/getting-started/android/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@

## Setting up _fastlane_

Android Studio maintains its own instances of Gradle and Java, which you do not have access to in the command line. So even though you can build and run apps in Android Studio, you need to install those tools for fastlane separately. Additionally, you need to install Java _8_ and not a later version of Java, which do not play well with Gradle.

### Install Java 8
For macOS, the easiest way to install Java 8 is with [Homebrew](https://brew.sh/).

Run the following commands in the terminal:
```
brew tap caskroom/versions
brew cask install java8
```

The terminal command: `javac -version` should now return something similar to: `javac 1.8.0_202-ea`

If this is not the case, your JAVA_HOME environment variable likely refers to a more recent version of Java. The easiest way to fix this is to uninstall all Java instances which were installed via Homebrew with `brew cask uninstall java` and then install Java 8 with `brew cask install java8`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If this is not the case, your JAVA_HOME environment variable likely refers to a more recent version of Java. The easiest way to fix this is to uninstall all Java instances which were installed via Homebrew with `brew cask uninstall java` and then install Java 8 with `brew cask install java8`
If this is not the case, your `JAVA_HOME` environment variable likely refers to a more recent version of Java. The easiest way to fix this is to uninstall all Java instances which were installed via Homebrew with `brew cask uninstall java` and then install Java 8 with `brew cask install java8`


### Install Gradle

On macOS you can install Gradle via homebrew with the command `brew install gradle`.

### Configure fastlane

Navigate your terminal to your project's directory and run

```no-highlight
Expand Down