-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
[M1] App won't run on Emulator #85904
Comments
Hi @Tejaswgupta If the problem persists, can you please provide a complete reproducible minimal code sample, and complete |
@TahaTesser Java 11 won't run on M1 chip as far as I know. Only Java 16 from Azul supports M1 and same goes for Android Studio , only the latest previews(Arctic Fox) work natively for the M1. The project I'm working with has a pretty large codebase, but I tried it with the default boilerplate code and the result is same. flutter run -v
|
Hi @Tejaswgupta,
so when I echo the JAVA_HOME path in terminal
Also when I check for java version I see the
So I believe the azul jdk is properly set And in one of the sample project I upgraded the gradle to 7.1.1 version by adding this in
I have also added the Azul Open Jdk path in Arctic Fox, and I was able to run the flutter sample app . Let me know if you think any of this step is wrong flutter doctor -v[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-arm, locale en-IN)
• Flutter version 2.2.3 at /Users/mahesh/Documents/flutter
• Framework revision f4abaa0735 (5 days ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/mahesh/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = /Users/mahesh/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio
• Android Studio at /Applications/Android Studio Preview.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] IntelliJ IDEA Community Edition (version 2021.1.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 57.0.5
• Dart plugin version 211.7233
[✓] VS Code (version 1.57.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.24.0
[✓] Connected device (3 available)
• sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 11.4 20F71 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114
! Doctor found issues in 1 category. |
@maheshmnj All the steps are correct, i just installed Gradle systemwide with brew and also added |
okay let me try that and the export path that you are referring to should be this |
There should be these two in the ~/.zshrc I also tried using JDK 11 from azul but still the same result. I also noticed that in your case android studio is using its embedded jdk and not the one from azul |
Actually, I have two android studio's installed the Android Studio Preview (arctic fox) version is not able to detect the Azul JDK and the other is a stable version of Android Studio which is using the open JDK |
are you able to run the app with the real android device? |
Finally, I was able to reproduce the issue on the latest stable and the master channel, I uninstalled my stable android studio and reinstalled arctic fox Android Preview, which uses Error logs
Heres my flutter doctor output which mentions the azul jdk being used and "Unable to find bundled Java version" issue in the flutter doctor can be ignored thats probably because the command line tool does not recognize the new Android Studio as mentioned here #81909 (comment) flutter doctor -v
|
@maheshmnj I reinstalled arctic fox, set JDK 11 at JAVA_HOME and android studio. Was able to run the counter app properly. |
Please provide your updated flutter doctor's output And also feel free to comment on the solution so that this helps someone who faces this issue in the future. |
|
From your doctors output, I could see that you are using |
Yes , it is present when using jdk 16. |
Thanks for the confirmation |
Not sure if it's relevant but having the same drama, is doctor output
|
/cc @blasten The tool may be having trouble finding things due to using the Android Studio beta that newly has support for M1. |
@Tejaswgupta is this still occurring? |
Optimistically closing this as fixed now that Android Studio supports ARM. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
Logs
Logs
The text was updated successfully, but these errors were encountered: