Ad

Ionic Error: Failed To Create MD5 Hash For File 'C:\....\gradle-bintray-plugin-1.7.3.jar'

I try to use the command ionic cordova run android (which worked perfectly yesterday) but got the error:

Failed to create MD5 hash for file 'C:\Users\mique.gradle\caches\modules-2\files-2.1\com.jfrog.bintray.gradle\gradle-bintray-plugin\1.7.3\9e215be9f47ee839e9d8d1f3b972d2f3d76afca7\gradle-bintray-plugin-1.7.3.jar'.

The only thing that changed is that I used the ionic storage to get a value stored in an array, but I also did that before and it worked perfectly.

I've tried:

  • Installing new gradle version 5.3
  • Cleaning project
  • Using Android Studio to build it (but gives the same error)

It works if I run it locally on my browser. Here's the error msg:

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)

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'android'.

BUILD FAILED

Total time: 1.817 secs

Could not resolve all dependencies for configuration ':_debugApk'. A problem occurred configuring project ':CordovaLib'. Failed to create MD5 hash for file 'C:\Users\mique.gradle\caches\modules-2\files-2.1\com.jfrog.bintray.gradle\gradle-bintray-plugin\1.7.3\9e215be9f47ee839e9d8d1f3b972d2f3d76afca7\gradle-bintray-plugin-1.7.3.jar'.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. (node:14504) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'android'.

    Could not resolve all dependencies for configuration ':_debugApk'. A problem occurred configuring project ':CordovaLib'. Failed to create MD5 hash for file 'C:\Users\mique.gradle\caches\modules-2\files-2.1\com.jfrog.bintray.gradle\gradle-bintray-plugin\1.7.3\9e215be9f47ee839e9d8d1f3b972d2f3d76afca7\gradle-bintray-plugin-1.7.3.jar'.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 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.

I expect this commando to install the app in my device as it did previously.

Ad

Answer

If someone needs any help, this solved itself.

The only things I did after that was:

  • Update my gradle version manually.
  • Restart my computer.
  • Run on Windows Console AS ADMINISTRATOR

After this, I have to run it every time as admin but it works and I can test on my device.

Ad
source: stackoverflow.com
Ad