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 emulator not supported on M1 hardware #616

Closed
GitHubofkangk opened this issue Sep 4, 2021 · 4 comments
Closed

Android emulator not supported on M1 hardware #616

GitHubofkangk opened this issue Sep 4, 2021 · 4 comments
Labels
android The issue relates to Android mobile support. enhancement New features, or improvements to existing features.

Comments

@GitHubofkangk
Copy link

GitHubofkangk commented Sep 4, 2021

Describe the bug

Attempting to run the android emulator on Mac M1 hardware fails with the error

FileNotFoundError: [Errno 2] No such file or directory: '/Users/likang/.briefcase/tools/android_sdk/emulator/emulator'.

To Reproduce
Steps to reproduce the behavior:

(venv) ➜  BeeWare cd beeware-tutorial 
(venv) ➜  beeware-tutorial cd heloworld       
(venv) ➜  heloworld briefcase dev        # run in development

[heloworld] Starting in dev mode...
Hello 
(venv) ➜  heloworld briefcase build android      # build android
[heloworld] Building Android APK...
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :app:externalNativeBuildDebug
Build native-lib_armeabi-v7a
Build native-lib_arm64-v8a
Build native-lib_x86
Build native-lib_x86_64

BUILD SUCCESSFUL in 17s
31 actionable tasks: 2 executed, 29 up-to-date

[heloworld] Built android/gradle/Hello World/app/build/outputs/apk/debug/app-debug.apk
(venv) ➜  heloworld briefcase run android          # run android
Traceback (most recent call last):
  File "/Users/likang/PycharmProjects/BeeWare/venv/bin/briefcase", line 8, in <module>
    sys.exit(main())
  File "/Users/likang/PycharmProjects/BeeWare/venv/lib/python3.9/site-packages/briefcase/__main__.py", line 11, in main
    command(**options)
  File "/Users/likang/PycharmProjects/BeeWare/venv/lib/python3.9/site-packages/briefcase/commands/run.py", line 77, in __call__
    state = self.run_app(app, **full_options(state, options))
  File "/Users/likang/PycharmProjects/BeeWare/venv/lib/python3.9/site-packages/briefcase/platforms/android/gradle.py", line 151, in run_app
    device, name, avd = self.android_sdk.select_target_device(
  File "/Users/likang/PycharmProjects/BeeWare/venv/lib/python3.9/site-packages/briefcase/integrations/android_sdk.py", line 449, in select_target_device
    for avd in self.emulators():
  File "/Users/likang/PycharmProjects/BeeWare/venv/lib/python3.9/site-packages/briefcase/integrations/android_sdk.py", line 331, in emulators
    output = self.command.subprocess.check_output(
  File "/Users/likang/PycharmProjects/BeeWare/venv/lib/python3.9/site-packages/briefcase/integrations/subprocess.py", line 85, in check_output
    return self._subprocess.check_output(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/likang/.briefcase/tools/android_sdk/emulator/emulator'

Expected behavior
run in android emulator

Environment:

  • Operating System: macOS Big Sur apple m1
  • Python version:3.9
  • Software versions:
    • Briefcase:0.3.5
    • Toga:
    • ...
@freakboy3742 freakboy3742 transferred this issue from beeware/beeware.github.io Sep 5, 2021
@freakboy3742 freakboy3742 changed the title (macos m1)FileNotFound : android emulator Android emulator not supported on M1 hardware Sep 5, 2021
@freakboy3742
Copy link
Member

Android has only recently added support for running the Android emulator on M1 Mac hardware; Briefcase has not yet been updated to provide this support. I suspect this should be a matter of updating the SDK Manager components to reflect the M1 hardware target instead of x86.

@freakboy3742 freakboy3742 added android The issue relates to Android mobile support. enhancement New features, or improvements to existing features. up-for-grabs labels Sep 5, 2021
@iamzili
Copy link
Contributor

iamzili commented Sep 16, 2021

@freakboy3742 Hi, I would like to start work on this issue, it is possible to test somehow without M1 hardware?

@freakboy3742
Copy link
Member

@zili Unfortunately not - pretty much by definition, the M1 emulator will only run on M1 hardware.

@iamzili
Copy link
Contributor

iamzili commented Sep 17, 2021

ok then someone with M1 hardware can take this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android The issue relates to Android mobile support. enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

3 participants