简体   繁体   English

Android 升级后使用 eas 构建失败 SDK

[英]Android build failed using eas build after upgrade SDK

Git Issue: https://github.com/expo/eas-cli/issues/1137 Git 问题: https://github.com/expo/eas-cli/issues/1137

I upgraded my expo project to expo 44.0.0 from expo 41.0.0.我将我的 expo 项目从 expo 41.0.0 升级到 expo 44.0.0。 While building the project using the command eas build --profile development --platform android, it fails with the above errors.使用命令 eas build --profile development --platform android 构建项目时,它失败并出现上述错误。 Building with expo expo build:android -t apk --release-channel dev works fine.使用 expo expo build:android -t apk --release-channel dev 工作正常。

Error output错误 output

Task :app:checkDebugAarMetadata FAILED
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:checkDebugAarMetadata'.
[stderr] > Multiple task action failures occurred:
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-view:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/12d1024712f31229ca58ab0bd8d21333/transformed/jetified-camera-view-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-extensions:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/b2e353b2c9ab37ded94a57d84d9c945e/transformed/jetified-camera-extensions-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-camera2:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/2675a37f413249dd4d5209666654efc4/transformed/jetified-camera-camera2-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-lifecycle:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/afe4b84723f7135b1bdead4bacd36e0e/transformed/jetified-camera-lifecycle-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-video:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/94888a47c690a5797cfc0500a21eeb39/transformed/jetified-camera-video-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-core:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/1d9440d353cb849104352a1a0b312396/transformed/jetified-camera-core-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.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 3m 6s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
45 actionable tasks: 45 executed
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

I've had this issue in one of my projects, I had to use./gradlew build --warning-mode=all to check which deprecated features were giving me this issue, I believe I fixed it by upgrading one of the dependencies.我在我的一个项目中遇到了这个问题,我不得不使用 ./gradlew build --warning-mode=all 检查哪些已弃用的功能给了我这个问题,我相信我通过升级其中一个依赖项来修复它。 You can also try to run cd android &&./gradlew clean to clean any cache ( sometimes this also may fix the issue)您也可以尝试运行 cd android &&./gradlew clean 来清理任何缓存(有时这也可以解决问题)

I had this error too and it took me days before I could figure it out.我也有这个错误,我花了好几天才弄明白。 I installed the latest version of java which as of now is jdk 17. Seems the support of this wasn't readily available yet since it was still new.我安装了最新版本的 java,截至目前它是 jdk 17。似乎还没有现成的支持,因为它还是新的。 I had to uninstall it and download java version 11 (jdk 11).我不得不卸载它并下载 java 版本 11 (jdk 11)。 I equally had issues finding somewhere to download it from without paying or registering.我同样在不付费或注册的情况下找到某个地方下载它的问题。 If you need to download this, check out azul如果需要下载,请查看azul

Edit: Ensure to set it as your environment variable in your PC/mac.编辑:确保将其设置为 PC/mac 中的环境变量。 Control panel > system settings > system > advanced settings > environment variables > system variables > look for JAVA_HOME(or whatever you named yours) and change the path from your old installation folder to your new java 11 installation folder. You must exit from cmd or whatever terminal or version control you are using and restart it for it to get the new path.您必须退出 cmd 或您正在使用的任何终端或版本控制并重新启动它以获得新路径。 To check if the app has the new path, in your terminal, type echo %JAVA_HOME% .要检查应用程序是否具有新路径,请在终端中输入echo %JAVA_HOME% It should show you the new path of your java installation.它应该向您显示 java 安装的新路径。 Also check if the java version is set too by entering, java -version通过输入java -version检查 java 版本是否也设置了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Eas android 构建 (eas build --platform android) 失败。 react-native-firebase_messaging:compileReleaseJavaWithJavac 失败 - Eas android build (eas build --platform android) fails. react-native-firebase_messaging:compileReleaseJavaWithJavac FAILED eas build -p android 失败 - eas build -p android fails Expo 构建 EAS - 本地 - SDK 位置未找到 - Expo build EAS - local - SDK location not found 如何使用 eas build 构建 expo apk - How to build expo apk using eas build Android构建失败。 在添加Firebase Performance SDK之后 - Android build failed. after firebase performance sdk added 更新到Android Studio 1.4和最新的SDK后,构建失败 - Build Failed after updating to Android Studio 1.4 and latest SDK 升级后在 nfc_in_flutter 上构建失败 - Build failed on nfc_in_flutter after upgrade EAS 构建失败,错误代码为 1,但 Expo Build 成功,我需要 EAS 构建来删除未使用的包,如 com.segment.analytics.android:analytics - EAS build failed with error code 1 but Expo Build succeeds, i need EAS build to remove unused packages like com.segment.analytics.android:analytics EXPO [Android] [EAS] Build 在启动时崩溃 - EXPO [Android] [EAS] Build Crashes at Startup 反应原生 EAS Android 构建失败 - React native EAS Android Build fails
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM