-
-
Notifications
You must be signed in to change notification settings - Fork 372
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 build on ARM Mac without Rosetta gives error "Bad CPU type in executable" #1000
Comments
Unfortunately that leads to another problem: all the binaries installed by the sdkmanager are x86, so the emulator doesn't work:
briefcase.2022_12_12-17_56_47.run.log
I was able to work around this by installing the emulator through Android Studio:
... and setting ANDROID_SDK_ROOT to that location. But I'm not sure what the proper solution to this is, or why it hasn't been reported by anyone else. |
That's odd... I don't remember explicitly installing Rosetta on my M1. I can only assume it was implicitly installed by one of the (many) other tools that I installed when I was setting up my machine. I do have "fond" memories of wrestling Android through x86 compatibility though :-) The one thing that I remember is that I spent of lot of time purging caches and "starting clean". If the Android tools installation broke half way, I essentially needed to start from scratch next time, or Android would get itself tied in knots trying to work out whether it needed x86 or ARM binaries. Purging the Briefcase Android cache and the |
Describe the bug
Briefcase installs an x86 version of Java, because there's no ARM build available for Java 8 (see #827 for why we're still on that version). But the x86 build won't run unless Rosetta is installed.
Steps to reproduce
On an ARM Mac which doesn't have Rosetta, follow the Android section of the BeeWare tutorial.
Expected behavior
Build succeeds.
Screenshots
No response
Environment
Logs
briefcase.2022_12_12-17_06_16.create.log
Additional context
As shown here, this can be fixed by running
softwareupdate --install-rosetta
. Briefcase should do this automatically.The text was updated successfully, but these errors were encountered: