简体   繁体   English

适用于Android的Docker容器:Gradle构建守护程序意外消失(可能已被杀死或可能已崩溃)

[英]Docker container for Android : Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

I am try to build android on Docker container, I am getting every time this error for ./gradlew assembleDebug 我试着在Docker容器上构建android,每次这个错误都会得到./gradlew assembleDebug

:saltside-android:transformClassesWithDexForBikroyDebugThe message received from the daemon indicates that the daemon has disappeared. :saltside-android:transformClassesWithDexForBikroyDebug从守护进程收到的消息表明该守护进程已消失。 Build request sent: BuildAndStop{id=81f2e456-bb5b-4cf8-9190-3c8b22e286b6.1, currentDir=/app/project-main} Attempting to read last messages from the daemon log... Daemon pid: 35 log file: /root/.gradle/daemon/3.3/daemon-35.out.log ----- Last 20 lines from daemon log file - daemon-35.out.log ----- :saltside-android:processBugsnagBikroyDebugManifest :saltside-android:processBikroyDebugResources :saltside-android:generateBikroyDebugSources :saltside-android:incrementalBikroyDebugJavaCompilationSafeguard :saltside-android:javaPreCompileBikroyDebug :saltside-android:compileBikroyDebugJavaWithJavacNote: Some input files use or override a deprecated API. 发送构建请求:BuildAndStop {id = 81f2e456-bb5b-4cf8-9190-3c8b22e286b6.1,currentDir = / app / project-main}尝试从守护程序日志中读取最后的消息...守护程序pid:35日志文件:/ root /.gradle/daemon/3.3/daemon-35.out.log -----来自守护程序日志文件的最后20行 - daemon-35.out.log -----:saltside-android:processBugsnagBikroyDebugManifest:saltside-android :processBikroyDebugResources:saltside-android:generateBikroyDebugSources:saltside-android:incrementalBikroyDebugJavaCompilationSafeguard:saltside-android:javaPreCompileBikroyDebug:saltside-android:compileBikroyDebugJavaWithJavacNote:某些输入文件使用或覆盖不推荐使用的API。 Note: Recompile with -Xlint:deprecation for details. 注意:使用-Xlint重新编译:弃用以获取详细信息。 Note: Some input files use unchecked or unsafe operations. 注意:某些输入文件使用未经检查或不安全的操作。 Note: Recompile with -Xlint:unchecked for details. 注意:使用-Xlint重新编译:取消选中以获取详细信息。 : :saltside-android:compileBikroyDebugNdk UP-TO-DATE :saltside-android:compileBikroyDebugSources :saltside-android:mergeBikroyDebugShaders :saltside-android:compileBikroyDebugShaders :saltside-android:generateBikroyDebugAssets :saltside-android:mergeBikroyDebugAssets :saltside-android:processBugsnagBikroyDebugProguard :saltside-android:transformClassesWithJarMergingForBikroyDebug :saltside-android:transformClassesWithMultidexlistForBikroyDebug :saltside-android:transformClassesWithDexForBikroyDebug ----- End of the daemon log ----- : FAILURE: Build failed with an exception. ::盐酰-android:compileBikroyDebugNdk UP-TO-DATE:saltside-android:compileBikroyDebugSources:saltside-android:mergeBikroyDebugShaders:saltside-android:compileBikroyDebugShaders:saltside-android:generateBikroyDebugAssets:sa​​ltside-android:mergeBikroyDebugAssets:sa​​ltside-android:processBugsnagBikroyDebugProguard:saltside -android:transformClassesWithJarMergingForBikroyDebug:saltside-android:transformClassesWithMultidexlistForBikroyDebug:saltside-android:transformClassesWithDexForBikroyDebug -----守护程序日志结束-----:FAILURE:构建失败并出现异常。 : * What went wrong: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed) : * Try: Run with --stacktrace option to get the stack trace. :*出了什么问题:Gradle构建守护程序意外消失(它可能已被杀死或可能已崩溃):*尝试:使用--stacktrace选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output. 使用--info或--debug选项运行以获取更多日志输出。

I already increased memory and disabled daemon in gradle.properties like this 我已经在这样的gradle.properties中增加了内存和禁用守护进程

    org.gradle.jvmargs=-Xmx4608m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.daemon=false

Any body know what can be solution for it? 任何人都知道什么可以解决它?

I got solution but still writing answer so that if any body have same problem and can solve it. 我得到了解决方案但仍在写答案,以便如果任何身体有同样的问题并且可以解决它。 It was due to memory size of docker container, I am using mac and looks like issue is with mac machine only. 这是由于docker容器的内存大小,我使用mac而且看起来问题只与mac机器有关。 On mack by default container size was 2GB, you can check on docker container with free command. 默认情况下,mack默认容器大小为2GB,您可以使用free命令检查docker容器。 so increase it to 4GB or more, boom it will solve your problem. 所以将它增加到4GB或更多,繁荣它将解决你的问题。

Docker->Preferences->Advanced->Memory

单击首选项

增加记忆力

暂无
暂无

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

相关问题 错误:Gradle构建守护程序意外消失(可能已被杀死或崩溃) - Error:Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed) 在 Jenkins 上构建 Android 项目时,Gradle 构建守护进程意外消失(它可能已被杀死或崩溃) - Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed) while building Android project on Jenkins “错误:无法完成Gradle执行。原因:Gradle构建守护程序意外消失(可能已被杀死或可能已崩溃) - “Error:Failed to complete Gradle execution. Cause: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)” Gradle 构建守护进程意外消失 - Gradle build daemon disappeared unexpectedly Gradle 构建守护进程意外消失... Android Studio 4.0.1 - Gradle build daemon disappeared unexpectedly… Android Studio 4.0.1 Android Studio-Gradle构建守护进程意外消失错误 - Android Studio - Gradle build daemon disappeared unexpectedly error Gradle 构建守护进程在 CircleCI 中意外消失 - Gradle build daemon disappeared unexpectedly in CircleCI build daemon 在 android studios 中意外消失 - build daemon disappeared unexpectedly in android studios Jenkins构建失败,Gradle构建守护进程意外消失 - Jenkins build failure,Gradle build daemon disappeared unexpectedly Gradle 失败可能是因为这个 Flutter 应用程序中的 AndroidX 不兼容 - The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM