This one is driving me crazy. I’m using VS Code + Flutter to build a mobile application for Android devices. I can compile and run easily both debug and release versions on my laptop, but when I port the exact same code over to my PC, it fails with an exception. I’m beginning to think it may be some kind of hardware issue but nothing immediately sticks out to me.
Here’s the JVM crash log: https://drive.google.com/file/d/152I0TeG3UlVj2nbn30d0Vs_Kk8zF0Joz/view?usp=sharing
I’ve tried all the usual things, cleaning gradle, cleaning flutter, deleting .gradle folders, etc. etc. Hoping someone can be my saviour on this!
Changing current working directory to: C:UsersgeoffDocumentsProjectsarcadious
Expected to find fonts for (MaterialIcons, packages/cupertino_icons/CupertinoIcons), but found (MaterialIcons). This usually means you are referring to font families in an IconData class but not including them in the assets section of your pubspec.yaml, are missing the package that would include them, or are missing "uses-material-design: true".
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 2168 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:UsersgeoffAppDataLocalPubCachehostedpub.devgoogle_mobile_ads-5.1.0androidsrcmainjavaioflutterpluginsgooglemobileadsFlutterRequestAgentProvider.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
The message received from the daemon indicates that the daemon has disappeared.
Build request sent: Build{id=f21c7b8c-f7da-4c61-b675-02c1de5caa0e, currentDir=C:UsersgeoffDocumentsProjectsarcadiousandroid}
Attempting to read last messages from the daemon log...
Daemon pid: 22212
log file: C:Usersgeoff.gradledaemon8.10.2daemon-22212.out.log
----- Last 20 lines from daemon log file - daemon-22212.out.log -----
2024-09-27T13:47:04.304+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2024-09-27T13:47:04.305+0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2024-09-27T13:47:04.305+0800 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] resetting idle timer
2024-09-27T13:47:04.305+0800 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is running. Sleeping until state changes.
2024-09-27T13:47:04.305+0800 [INFO] [org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy] Daemon is about to start building Build{id=f21c7b8c-f7da-4c61-b675-02c1de5caa0e, currentDir=C:UsersgeoffDocumentsProjectsarcadiousandroid}. Dispatching build started information...
2024-09-27T13:47:04.305+0800 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 35: dispatching org.gradle.launcher.daemon.protocol.BuildStarted@10ae6077
2024-09-27T13:47:04.306+0800 [DEBUG] [org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment] Configuring env variables: [PATH, USERDOMAIN_ROAMINGPROFILE, PROCESSOR_LEVEL, SYSTEMDRIVE, SESSIONNAME, ALLUSERSPROFILE, PROCESSOR_ARCHITECTURE, VSCODE_GIT_IPC_HANDLE, DRIVERDATA, PROGRAMFILES, VSCODE_INJECTION, EFC_8168, PSMODULEPATH, COLORTERM, PROGRAMDATA, DIRNAME, USERNAME, VSCODE_GIT_ASKPASS_NODE, TERM_PROGRAM_VERSION, CMD_LINE_ARGS, GIT_ASKPASS, CHROME_CRASHPAD_PIPE_NAME, EXIT_WITH_ERRORLEVEL, VSCODE_STABLE, FPS_BROWSER_USER_PROFILE_STRING, ONEDRIVE, APP_HOME, MINGIT_PATH, PATHEXT, SNAPSHOT_PATH, SHARED_BIN, WINDIR, ORIGINAL_XDG_CURRENT_DESKTOP, HOMEPATH, PROCESSOR_IDENTIFIER, PUBLIC, CACHE_DIR, ZES_ENABLE_SYSMAN, _SKIP, LOCALAPPDATA, COMMONPROGRAMFILES(X86), USERDOMAIN, DART_SDK_PATH, FPS_BROWSER_APP_PROFILE_STRING, LOGONSERVER, JAVA_HOME, FLUTTER_TOOLS_DIR, PROMPT, PROGRAMFILES(X86), FLUTTER_ROOT, LANG, VSCODE_GIT_ASKPASS_MAIN, =C:, APPDATA, PROGRAMW6432, SYSTEMROOT, JAVA_EXE, VSCODE_GIT_ASKPASS_EXTRA_ARGS, DART, OS, TERM_PROGRAM, COMMONPROGRAMW6432, COMPUTERNAME, COMMONPROGRAMFILES, COMSPEC, PROCESSOR_REVISION, CLASSPATH, VSCODE_NONCE, APP_BASE_NAME, TEMP, FLUTTER_ALREADY_LOCKED, HOMEDRIVE, USERPROFILE, TMP, NUMBER_OF_PROCESSORS]
2024-09-27T13:47:04.308+0800 [DEBUG] [org.gradle.launcher.daemon.server.exec.LogToClient] About to start relaying all logs to the client via the connection.
2024-09-27T13:47:04.308+0800 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] The client will now receive all logging from the daemon (pid: 22212). The daemon log file: C:Usersgeoff.gradledaemon8.10.2daemon-22212.out.log
2024-09-27T13:47:04.309+0800 [INFO] [org.gradle.launcher.daemon.server.exec.LogAndCheckHealth] Starting build in new daemon [memory: 4 GiB]
2024-09-27T13:47:04.310+0800 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has started executing the build.
2024-09-27T13:47:04.310+0800 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] Executing build with daemon context: DefaultDaemonContext[uid=a6a36e05-9676-4584-a054-dd5be7915c14,javaHome=C:Program FilesAndroidAndroid Studiojbr,javaVersion=17,javaVendor=JetBrains s.r.o.,daemonRegistryDir=C:Usersgeoff.gradledaemon,pid=22212,idleTimeout=10800000,priority=NORMAL,applyInstrumentationAgent=true,nativeServicesMode=ENABLED,daemonOpts=-XX:MaxMetaspaceSize=2G,-XX:+HeapDumpOnOutOfMemoryError,--add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED,--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Xmx4G,-Dfile.encoding=windows-1252,-Duser.country=SG,-Duser.language=en,-Duser.variant]
Expected to find fonts for (MaterialIcons, packages/cupertino_icons/CupertinoIcons), but found (MaterialIcons). This usually means you are referring to font families in an IconData class but not including them in the assets section of your pubspec.yaml, are missing the package that would include them, or are missing "uses-material-design: true".
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 2168 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:UsersgeoffAppDataLocalPubCachehostedpub.devgoogle_mobile_ads-5.1.0androidsrcmainjavaioflutterpluginsgooglemobileadsFlutterRequestAgentProvider.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.----- End of the daemon log -----
JVM crash log found: file:///C:/Users/geoff/Documents/Projects/arcadious/android/hs_err_pid22212.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.
Running Gradle task 'assembleRelease'... 34.1s
Gradle task assembleRelease failed with exit code 1```
2
Answers
Try this command:
According to the error logs, found this solution for the similar error, give it a try. Note that, in Windows the
.gradle
folder path will be:C:/Users/{username}/.gradle
copied from the following question:
flutter: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)