Build with JDK 7 on macOS / OSX

I am trying to build a Xamarin app with some gradlew steps before. The gradlew steps succeed but I get an error in the Xamarin build step (which links the previously created java libraries). The error appeared on my build machine when I had changed to JDK 8 in Android Studio. So I guess I need to make sure that the java libraries are built with JDK 7 in bitrise as well. How can I dod that?

1 Like

Hi @PhilippC,

Thanks for asking this here! :slight_smile:

If possible, the best solution would be to upgrade your project to work with Java 8, as that’s the Java version Xamarin comes with, as well as the version you can install from brew or through MacOS’ built in Java installer (AFAIK).

You definitely can install Java 7, as you can run any Script and install & run any command you would on your own Mac - related docs: http://devcenter.bitrise.io/tips-and-tricks/install-additional-tools/

That said, I tried to search for a simple solution, like a brew install or brew cask install, but couldn’t find Java 7 there, it’s all Java 8 now… So you’ll have to search for a command line / terminal based solution (something like https://www.google.com/?gfe_rd=cr&ei=TUcQWdGfNIWu8wegkIygBg&gws_rd=ssl,cr&fg=1#q=install+java+macos+terminal ).

If you have any questions or we can help with something just let us know!