我使用的是M1 Mac OS11.5.2。
\n我已经在“/Library/Java/JavaVirtualMachines”中下载了 zulu.jdk 和 zulu.jre。
\n我还导出了 PATH。
echo export "JAVA_HOME=\\$(/usr/libexec/java_home)" >> ~/.bash_profile\nRun Code Online (Sandbox Code Playgroud)\n当我打字时
\nsudo apt update\nRun Code Online (Sandbox Code Playgroud)\n我明白了:
\n\n\n无法完成操作\xe2\x80\x99。无法找到支持 apt 的 Java 运行时。
\n
\n请访问http://www.java.com以获取有关安装 Java 的信息。
希望好心人告诉我解决办法。
\n我无法在 android 模拟器或 android 手机上运行 flutter 应用程序。我在 m1 mac 上安装了最近发布的适用于 arm-mac 平台的 android studio。如果我在这里做错了什么,或者是发布本身的问题,请回答。
调试控制台输出:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Exception: Gradle task assembleDebug failed with exit code 1
Run Code Online (Sandbox Code Playgroud)
颤振医生 -v 输出:
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for …Run Code Online (Sandbox Code Playgroud)