Android Gradle 插件需要 Java 11 到 运行。您当前使用的是 Java 1.8。 **EXPO.dev**
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. **EXPO.dev**
我正在尝试使用命令 eas build -p android
来构建我的 android .aab
文件,但每次我尝试这样做时,我都会发现错误
Android build failed:
Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.
检查 https://expo.dev/accounts/xyz/projects/abc/builds/abababababa...
上的构建后,我在下面的整个日志中发现标题中的错误:
Running './gradlew :app:bundleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-7.2-all.zip
Unzipping /home/expo/.gradle/wrapper/dists/gradle-7.2-all/260hg96vuh6ex27h9vo47iv4d/gradle-7.2-all.zip to /home/expo/.gradle/wrapper/dists/gradle-7.2-all/260hg96vuh6ex27h9vo47iv4d
Set executable permissions for: /home/expo/.gradle/wrapper/dists/gradle-7.2-all/260hg96vuh6ex27h9vo47iv4d/gradle-7.2/bin/gradle
Welcome to Gradle 7.2!
Here are the highlights of this release:
- Toolchain support for Scala
- More cache hits when Java source files have platform-specific line endings
- More resilient remote HTTP build cache behavior
For more details see https://docs.gradle.org/7.2/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
[stderr] FAILURE: Build failed with an exception.
[stderr] * Where:
[stderr] Build file '/home/expo/workingdir/build/android/app/build.gradle' line: 1
[stderr] * What went wrong:
[stderr] A problem occurred evaluating project ':app'.
[stderr] > Failed to apply plugin 'com.android.internal.application'.
[stderr] > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
[stderr] You can try some of the following options:
[stderr] - changing the IDE settings.
[stderr] - changing the JAVA_HOME environment variable.
[stderr] - changing `org.gradle.java.home` in `gradle.properties`.
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 48s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
Unable to list file systems to check whether they can be watched. The whole state of the virtual file system has been discarded. Reason: Could not query file systems: could not open mount file (errno 2: No such file or directory)
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.
在 Android Studio
中有在线资源显示如何修复它,但是当您的构建被 expo.dev
?
触发时,任何人都知道如何修复它
通过添加到 eas.json
中修复:
"production": {
"android": {
"image" : "latest"
}
}
我正在尝试使用命令 eas build -p android
来构建我的 android .aab
文件,但每次我尝试这样做时,我都会发现错误
Android build failed:
Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.
检查 https://expo.dev/accounts/xyz/projects/abc/builds/abababababa...
上的构建后,我在下面的整个日志中发现标题中的错误:
Running './gradlew :app:bundleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-7.2-all.zip
Unzipping /home/expo/.gradle/wrapper/dists/gradle-7.2-all/260hg96vuh6ex27h9vo47iv4d/gradle-7.2-all.zip to /home/expo/.gradle/wrapper/dists/gradle-7.2-all/260hg96vuh6ex27h9vo47iv4d
Set executable permissions for: /home/expo/.gradle/wrapper/dists/gradle-7.2-all/260hg96vuh6ex27h9vo47iv4d/gradle-7.2/bin/gradle
Welcome to Gradle 7.2!
Here are the highlights of this release:
- Toolchain support for Scala
- More cache hits when Java source files have platform-specific line endings
- More resilient remote HTTP build cache behavior
For more details see https://docs.gradle.org/7.2/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
[stderr] FAILURE: Build failed with an exception.
[stderr] * Where:
[stderr] Build file '/home/expo/workingdir/build/android/app/build.gradle' line: 1
[stderr] * What went wrong:
[stderr] A problem occurred evaluating project ':app'.
[stderr] > Failed to apply plugin 'com.android.internal.application'.
[stderr] > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
[stderr] You can try some of the following options:
[stderr] - changing the IDE settings.
[stderr] - changing the JAVA_HOME environment variable.
[stderr] - changing `org.gradle.java.home` in `gradle.properties`.
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 48s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
Unable to list file systems to check whether they can be watched. The whole state of the virtual file system has been discarded. Reason: Could not query file systems: could not open mount file (errno 2: No such file or directory)
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.
在 Android Studio
中有在线资源显示如何修复它,但是当您的构建被 expo.dev
?
通过添加到 eas.json
中修复:
"production": {
"android": {
"image" : "latest"
}
}