Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Build android bundle on MacBook M1? #348

Open
3 tasks done
BRoy98 opened this issue Oct 18, 2021 · 3 comments
Open
3 tasks done

Build android bundle on MacBook M1? #348

BRoy98 opened this issue Oct 18, 2021 · 3 comments
Labels
question Further information is requested

Comments

@BRoy98
Copy link

BRoy98 commented Oct 18, 2021

Question Checklist

Question Subject

Is it possible to build an android bundle on MacBook M1?

Question Description

As M1 currently supports JDK 17 only, how do we build android on M1? I have seen android studio uses its native JDK version instead of system JDK, is it possible to use JDK from Android Studio?

@BRoy98 BRoy98 added the question Further information is requested label Oct 18, 2021
@wkozyra95
Copy link
Contributor

you probably could do this by specifying JAVA_HOME, but I think we also validate the version of java in PATH, so you would also need to override it somehow.
Can't you install an older java version under rosetta?

As a side note turtle-cli is local alternative for classic builds that will be soon considered legacy builds and replaced by EAS, we will support cloud builds for while, but I don't expect turtle-cl will get much development in the future, so I recommend switching to eas, especially if you want to run builds on your own machine

EAS Build is currently in feature-preview phase ( it will go GA this year) and available only for paying users(there will be a free tier after GA), but local builds are available for everyone

https://docs.expo.dev/feature-preview/
https://docs.expo.dev/build-reference/local-builds/

@BRoy98
Copy link
Author

BRoy98 commented Oct 22, 2021

Hi @wkozyra95, Thanks for the information. As EAS is still in preview, I was trying to make turtle work on my machine.

After some digging, I found out some alternatives to oracle java8. In case someone is looking for the same, try Azul Zulu Builds of OpenJDK:

https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk

@virgil9306
Copy link

virgil9306 commented Nov 23, 2021

Any luck, @BRoy98 ?

Turtle is having some issues with this for me, the CLI doesn't install under Node 14 on my M1. But it installs under Node 17. However, Node 17 doesn't work for my app (incompatibilities on M1).

This is, I am also using Azul Zulu OpenJDK, and I can install setup:android under turtle-cli when I have it installed under Node 17. But it will fail (probably because all dependencies were installed under Node 14).

Let me know if this is a different problem to yours, so I can create a different issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants