When attempting to use the command ionic cordova run android, an error occurred that prevented the successful execution:
The process failed due to inability to create an MD5 hash for a specific file in the specified directory. This issue arose despite successfully executing the same command previously without errors.
Although I recently utilized Ionic storage to retrieve a stored value from an array, this action had been done before without any complications.
To troubleshoot, I have attempted the following steps:
- Installation of a new Gradle version (5.3)
- Cleaning the project
- Utilizing Android Studio for building purposes, which unfortunately resulted in the same error
Interestingly, the command executes without errors when running it locally on a web browser. Here is the accompanying error message:
Error Logs: ANDROID_HOME=C:\Users\mique\AppData\Local\Android\sdk JAVA_HOME=C:\Program Files\java\jdk1.8.0_161 Subproject Path: CordovaLib The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. at build_a4w9zaqe36jh3e0p2zyocl276.run(C:\Users\mique\Desktop\Entrepreneur\Apps\FitnessRecipies\FreeFitnessRecipes\platforms\android\build.gradle:141)
The build was unsuccessful, resulting in the following exception:
- Root Project Configuration Error:
BUILD FAILED
Total time: 1.817 secs
Dependency Resolution Error: An issue occurred while configuring project ':CordovaLib'. Failure events were observed during the creation of an MD5 hash for a specific file within the associated directories.
Potential Solutions: Execute with --stacktrace option to generate full stack trace details. Alternatively, utilize --info or --debug flag to access additional log output. (node:14504) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
Root Project Configuration Error:
Dependency Resolution Error: An issue occurred while configuring project ':CordovaLib'. Failure events were observed during the creation of an MD5 hash for a specific file within the associated directories.
Potential Solutions: Run with --stacktrace option to receive comprehensive stack trace data. Or enable --info or --debug mode for additional log information. at ChildProcess.whenDone (C:\Users\mique\Desktop\Entrepreneur\Apps\FitnessRecipies\FreeFitnessRecipes\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23) at ChildProcess.emit (events.js:189:13) at maybeClose (internal/child_process.js:970:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) (node:14504) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:14504) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The expected outcome of the command is to successfully install the app on the device, as previously accomplished.