sam@sam:/tmp$ gradle init
/opt/gradle/gradle-7.4.2/lib/gradle-launcher-7.4.2.jar
/home/sam/tools/android/jdk1.8.0_161/bin/java
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=96M; support was removed in 8.0
The message received from the daemon indicates that the daemon has disappeared.
Build request sent: Build{id=acebb312-eadf-490d-b8ad-ccee2b08af80, currentDir=/tmp}
Attempting to read last messages from the daemon log
Daemon pid: 62
log file: /home/sam/.gradle/daemon/7.4.2/daemon-6276.out.log
Last 20 lines from daemon log file - daemon-6276.out.log
2022-04-23T17:17:25.147+0800 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 45: received class org.gradle.launcher.daemon.protocol.Build
2022-04-23T17:17:25.147+0800 [DEBUG] [org.gradle.launcher.daemon.server.DefaultDaemonConnection] thread 45: Received non-IO message from client: Build{id=acebb312-eadf-490d-b8ad-ccee2b08af80, currentDir=/tmp}
2022-04-23T17:17:25.147+0800 [INFO] [org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler] Received command: Build{id=acebb312-eadf-490d-b8ad-ccee2b08af80, currentDir=/tmp}.
2022-04-23T17:17:25.147+0800 [DEBUG] [org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler] Starting executing command: Build{id=acebb312-eadf-490d-b8ad-ccee2b08af80, currentDir=/tmp} with connection: socket connection from /127.0.0.1:41520 to /127.0.0.1:58858.
2022-04-23T17:17:25.148+0800 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] Command execution: started DaemonCommandExecution[command = Build{id=acebb312-eadf-490d-b8ad-ccee2b08af80, currentDir=/tmp}, connection = DefaultDaemonConnection: socket connection from /127.0.0.1:41520 to /127.0.0.1:58858] after 0.0 minutes of idle
2022-04-23T17:17:25.148+0800 [INFO] [org.gradle.launcher.daemon.server.DaemonRegistryUpdater] Marking the daemon as busy, address: [d1254169-c032-4225-93b2-cb368c1e0668 port:41520, addresses:[localhost/127.0.0.1]]
2022-04-23T17:17:25.148+0800 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Marking busy by address: [d1254169-c032-4225-93b2-cb368c1e0668 port:41520, addresses:[localhost/127.0.0.1]]
2022-04-23T17:17:25.148+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addresses registry.
2022-04-23T17:17:25.148+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2022-04-23T17:17:25.148+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2022-04-23T17:17:25.149+0800 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] resetting idle timer
2022-04-23T17:17:25.149+0800 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is running. Sleeping until state changes.
2022-04-23T17:17:25.149+0800 [INFO] [org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy] Daemon is about to start building Build{id=acebb312-eadf-490d-b8ad-ccee2b08af80, currentDir=/tmp}. Dispatching build started information
2022-04-23T17:17:25.149+0800 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 19: dispatching org.gradle.launcher.daemon.protocol.BuildStarted@461bc6f7
2022-04-23T17:17:25.149+0800 [DEBUG] [org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment] Configuring env variables: [PATH, XAUTHORITY, NO_PROXY, XMODIFIERS, XDG_DATA_DIRS, GDMSESSION, MANDATORY_PATH, TEXTDOMAINDIR, GTK_IM_MODULE, JAVA_OPTS, DBUS_SESSION_BUS_ADDRESS, DEFAULTS_PATH, XDG_CURRENT_DESKTOP, JRE_HOME, COLORTERM, UPSTART_SESSION, QT4_IM_MODULE, SESSION_MANAGER, LOGNAME, JOB, PWD, IM_CONFIG_PHASE, LANGUAGE, WINDOWID, SHELL, LESSOPEN, INSTANCE, OLDPWD, GNOME_DESKTOP_SESSION_ID, GTK_MODULES, CLUTTER_IM_MODULE, XDG_SESSION_PATH, REPO_URL, TEXTDOMAIN, SESSIONTYPE, LS_COLORS, SHLVL, LESSCLOSE, QT_IM_MODULE, JAVA_HOME, TERM, XDG_CONFIG_DIRS, LANG, GNOME_KEYRING_CONTROL, XDG_SEAT_PATH, XDG_SESSION_ID, SELINUX_INIT, DISPLAY, _, no_proxy, GDM_LANG, UBUNTU_MENUPROXY, XDG_GREETER_DATA_DIR, GPG_AGENT_INFO, DESKTOP_SESSION, SESSION, USER, XDG_MENU_PREFIX, VTE_VERSION, SSH_AUTH_SOCK, XDG_SEAT, QT_QPA_PLATFORMTHEME, XDG_VTNR, XDG_RUNTIME_DIR, HOME, GNOME_KEYRING_PID]
2022-04-23T17:17:25.150+0800 [DEBUG] [org.gradle.launcher.daemon.server.exec.LogToClient] About to start relaying all logs to the client via the connection.
2022-04-23T17:17:25.151+0800 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] The client will now receive all logging from the daemon (pid: 6276). The daemon log file: /home/sam/.gradle/daemon/7.4.2/daemon-6276.out.log
2022-04-23T17:17:25.152+0800 [INFO] [org.gradle.launcher.daemon.server.exec.LogAndCheckHealth] Starting 2nd build in daemon [uptime: 20.406 secs, performance: 92%, non-heap usage: 13% of 256 MiB]
2022-04-23T17:17:25.152+0800 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has started executing the build.
2022-04-23T17:17:25.152+0800 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] Executing build with daemon context: DefaultDaemonContext[uid=f8fca874-cec6-4c0b-9060-cc1fa19aa727,javaHome=/home/sam/tools/android/jdk1.8.0_161,daemonRegistryDir=/home/sam/.gradle/daemon,pid=6276,idleTimeout=10800000,priority=NORMAL,daemonOpts=-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=CN,-Duser.language=zh,-Duser.variant]
End of the daemon log
FAILURE: Build failed with an exception.
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.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.Get more help at https://help.gradle.org/
执行现有的android 应用程序编译没问题,但执行 gradle init 一直失败,给点帮助。