'Cordova failing to build with gradle
I've been trying to make a cordova app but it's making me very stressed due to it not failing to build. I'm building my app through cmd and it always outputs an error. I've tried just a skeleton cordova app, and also tried doing it on another pc with fresh cordova installation but it still fails. The error is shown below, sorry it's long
'''> Could not resolve all files for configuration ':CordovaLib:debugCompileClasspath'.
Could not resolve androidx.appcompat:appcompat-resources:1.3.1. Required by: project :CordovaLib > androidx.appcompat:appcompat:1.3.1 > Could not resolve androidx.appcompat:appcompat-resources:1.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat-resources/1.3.1/appcompat-resources-1.3.1.module'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download2328980294243750283bin' into filestore at 'androidx.appcompat/appcompat-resources/1.3.1/f7e98e064eed98c706088dc2d4ff407bd6b2c652/appcompat-resources-1.3.1.module' > java.io.IOException: The file or directory is corrupted and unreadable > Could not resolve androidx.appcompat:appcompat-resources:1.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat-resources/1.3.1/appcompat-resources-1.3.1.module'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download6521801681299620291bin' into filestore at 'androidx.appcompat/appcompat-resources/1.3.1/f7e98e064eed98c706088dc2d4ff407bd6b2c652/appcompat-resources-1.3.1.module' > java.io.IOException: The file or directory is corrupted and unreadable Could not resolve androidx.lifecycle:lifecycle-runtime:2.3.1. Required by: project :CordovaLib > androidx.core:core:1.5.0 > Could not resolve androidx.lifecycle:lifecycle-runtime:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.3.1/lifecycle-runtime-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download5844684835346079503bin' into filestore at 'androidx.lifecycle/lifecycle-runtime/2.3.1/6991b67903c152737d17c12fa53610f1e3e049c/lifecycle-runtime-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-runtime' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-runtime\2.3.1\6991b67903c152737d17c12fa53610f1e3e049c' > Could not resolve androidx.lifecycle:lifecycle-runtime:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.3.1/lifecycle-runtime-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download4674269456908055721bin' into filestore at 'androidx.lifecycle/lifecycle-runtime/2.3.1/6991b67903c152737d17c12fa53610f1e3e049c/lifecycle-runtime-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-runtime' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-runtime\2.3.1\6991b67903c152737d17c12fa53610f1e3e049c' Could not resolve androidx.versionedparcelable:versionedparcelable:1.1.1. Required by: project :CordovaLib > androidx.core:core:1.5.0 > Could not resolve androidx.versionedparcelable:versionedparcelable:1.1.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/versionedparcelable/versionedparcelable/1.1.1/versionedparcelable-1.1.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download6711699027276886380bin' into filestore at 'androidx.versionedparcelable/versionedparcelable/1.1.1/301263729256e9f19b144ce00f83d600ba14c38b/versionedparcelable-1.1.1.pom' > java.io.IOException: The file or directory is corrupted and unreadable > Could not resolve androidx.versionedparcelable:versionedparcelable:1.1.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/versionedparcelable/versionedparcelable/1.1.1/versionedparcelable-1.1.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download4903515969653784290bin' into filestore at 'androidx.versionedparcelable/versionedparcelable/1.1.1/301263729256e9f19b144ce00f83d600ba14c38b/versionedparcelable-1.1.1.pom' > java.io.IOException: The file or directory is corrupted and unreadable Could not resolve androidx.lifecycle:lifecycle-runtime:2.3.1. Required by: project :CordovaLib > androidx.activity:activity:1.2.4 > Could not resolve androidx.lifecycle:lifecycle-runtime:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.3.1/lifecycle-runtime-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download5844684835346079503bin' into filestore at 'androidx.lifecycle/lifecycle-runtime/2.3.1/6991b67903c152737d17c12fa53610f1e3e049c/lifecycle-runtime-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-runtime' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-runtime\2.3.1\6991b67903c152737d17c12fa53610f1e3e049c' > Could not resolve androidx.lifecycle:lifecycle-runtime:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.3.1/lifecycle-runtime-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download4674269456908055721bin' into filestore at 'androidx.lifecycle/lifecycle-runtime/2.3.1/6991b67903c152737d17c12fa53610f1e3e049c/lifecycle-runtime-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-runtime' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-runtime\2.3.1\6991b67903c152737d17c12fa53610f1e3e049c' Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.3.1. Required by: project :CordovaLib > androidx.activity:activity:1.2.4 project :CordovaLib > androidx.fragment:fragment:1.3.6 > Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.3.1/lifecycle-viewmodel-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download5903896385340523618bin' into filestore at 'androidx.lifecycle/lifecycle-viewmodel/2.3.1/319f1b60575b6ba81aa588084b903aece6b33aa5/lifecycle-viewmodel-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel\2.3.1\319f1b60575b6ba81aa588084b903aece6b33aa5' > Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.3.1/lifecycle-viewmodel-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download2985655693056043515bin' into filestore at 'androidx.lifecycle/lifecycle-viewmodel/2.3.1/319f1b60575b6ba81aa588084b903aece6b33aa5/lifecycle-viewmodel-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel\2.3.1\319f1b60575b6ba81aa588084b903aece6b33aa5' Could not resolve androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1. Required by: project :CordovaLib > androidx.activity:activity:1.2.4 project :CordovaLib > androidx.fragment:fragment:1.3.6 > Could not resolve androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel-savedstate/2.3.1/lifecycle-viewmodel-savedstate-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download8303302072479775837bin' into filestore at 'androidx.lifecycle/lifecycle-viewmodel-savedstate/2.3.1/67c0adcbc0ca42eb784b7eeffb3f23cdcf7e8593/lifecycle-viewmodel-savedstate-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel-savedstate' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel-savedstate\2.3.1\67c0adcbc0ca42eb784b7eeffb3f23cdcf7e8593' > Could not resolve androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel-savedstate/2.3.1/lifecycle-viewmodel-savedstate-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download7415611745740958313bin' into filestore at 'androidx.lifecycle/lifecycle-viewmodel-savedstate/2.3.1/67c0adcbc0ca42eb784b7eeffb3f23cdcf7e8593/lifecycle-viewmodel-savedstate-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel-savedstate' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel-savedstate\2.3.1\67c0adcbc0ca42eb784b7eeffb3f23cdcf7e8593' Could not resolve androidx.lifecycle:lifecycle-livedata-core:2.3.1. Required by: project :CordovaLib > androidx.fragment:fragment:1.3.6 > Could not resolve androidx.lifecycle:lifecycle-livedata-core:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.3.1/lifecycle-livedata-core-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download2724576585185418148bin' into filestore at 'androidx.lifecycle/lifecycle-livedata-core/2.3.1/33a214022e333d8cd6d8c94b759eeaf2b7e3de79/lifecycle-livedata-core-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-livedata-core' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-livedata-core\2.3.1\33a214022e333d8cd6d8c94b759eeaf2b7e3de79' > Could not resolve androidx.lifecycle:lifecycle-livedata-core:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.3.1/lifecycle-livedata-core-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download7690925195019938185bin' into filestore at 'androidx.lifecycle/lifecycle-livedata-core/2.3.1/33a214022e333d8cd6d8c94b759eeaf2b7e3de79/lifecycle-livedata-core-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-livedata-core' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-livedata-core\2.3.1\33a214022e333d8cd6d8c94b759eeaf2b7e3de79' Could not resolve androidx.lifecycle:lifecycle-livedata:2.0.0. Required by: project :CordovaLib > androidx.loader:loader:1.0.0 > Could not resolve androidx.lifecycle:lifecycle-livedata:2.0.0. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata/2.0.0/lifecycle-livedata-2.0.0.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download2498317141883130313bin' into filestore at 'androidx.lifecycle/lifecycle-livedata/2.0.0/b1987c65a98cb0d6f43048be0c20f20f932fc1aa/lifecycle-livedata-2.0.0.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-livedata' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-livedata\2.0.0\b1987c65a98cb0d6f43048be0c20f20f932fc1aa' > Could not resolve androidx.lifecycle:lifecycle-livedata:2.0.0. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata/2.0.0/lifecycle-livedata-2.0.0.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download1395271830016092456bin' into filestore at 'androidx.lifecycle/lifecycle-livedata/2.0.0/b1987c65a98cb0d6f43048be0c20f20f932fc1aa/lifecycle-livedata-2.0.0.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-livedata' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-livedata\2.0.0\b1987c65a98cb0d6f43048be0c20f20f932fc1aa' Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.3.1. Required by: project :CordovaLib > androidx.loader:loader:1.0.0 > Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.3.1/lifecycle-viewmodel-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download5903896385340523618bin' into filestore at 'androidx.lifecycle/lifecycle-viewmodel/2.3.1/319f1b60575b6ba81aa588084b903aece6b33aa5/lifecycle-viewmodel-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel\2.3.1\319f1b60575b6ba81aa588084b903aece6b33aa5' > Could not resolve androidx.lifecycle:lifecycle-viewmodel:2.3.1. > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.3.1/lifecycle-viewmodel-2.3.1.pom'. > Failed to move file 'C:\Users\Hans.gradle.tmp\gradle_download2985655693056043515bin' into filestore at 'androidx.lifecycle/lifecycle-viewmodel/2.3.1/319f1b60575b6ba81aa588084b903aece6b33aa5/lifecycle-viewmodel-2.3.1.pom' > Failed to create parent directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel' when creating directory 'C:\Users\Hans.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-viewmodel\2.3.1\319f1b60575b6ba81aa588084b903aece6b33aa5'
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 9s 5 actionable tasks: 5 executed Command failed with exit code 1: C:\Users\Hans\Desktop\Hi\platforms\android\gradlew cdvBuildDebug -b C:\Users\Hans\Desktop\Hi\platforms\android\build.gradle'''
Thanks if someone can help me ;-;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
