我下载了最新的 Android Studio,我想运行 Android Jetpack Compose 项目,但是当我运行时,出现错误:
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
Run Code Online (Sandbox Code Playgroud)
我已经下载了 Java 11,并在 gradle.properties 中添加了 java 11。
org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home
Run Code Online (Sandbox Code Playgroud)
JAVA_HOME 显示 Java 11,但我运行,它不起作用,
/Library/Java/JavaVirtualMachines/jdk-11.0.10.jdk/Contents/Home
我应该怎么做?
我的 Java 版本
java 11.0.10 2021-01-19 LTS
Java(TM) SE Runtime …Run Code Online (Sandbox Code Playgroud) 如何在 Dart 中展平列表?就像平面地图一样。例如:
var a = [{"a":1, "b":1}, {"b":2, "c":2}, {"d":4, "c":3}];
var b = {"a":1, "b":2, "c":3, "d":4};
Run Code Online (Sandbox Code Playgroud)
如何将 a 到 b 转换为单个列表?