Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to capture fingerprint of input files for task ':checkDevClasspath' property 'compileClasspath' during up-to-date check

I'm trying to upgrade to gradle 3.2.1 in Android Studio, but the gradle build is failing with the below error.

 FAILURE: Build failed with an exception.

 * What went wrong:
 Failed to capture the fingerprint of input files for task ':checkDevDebugClasspath' property 'compileClasspath' during the up-to-date check.
 > 1

 * Try:
  Run with --scan to get full insights.

 * Exception is:
 org.gradle.api.UncheckedIOException: Failed to capture fingerprint of input files for task ':checkDevDebugClasspath' property 'compileClasspath' during up-to-date check.
    at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.fingerprintTaskFiles(CacheBackedTaskHistoryRepository.java:360)
    at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.createExecution(CacheBackedTaskHistoryRepository.java:163)

Not sure what is happening

like image 647
Brad Avatar asked Jan 09 '19 21:01

Brad


1 Answers

I know this is an old issue but I faced it several times and I fixed it in different ways. This can be caused by several things but it means that there are missing resources (modules) used in building your project.

if you are using pure android; I suggest cleaning the project then rebuilding it as follows:

cd android
./gradlew clean assemble

Note on android; If you are depending on other modules, make sure they exist and correctly set up. Also make sure you don't have any broken symlinks.

if you are using react-native you can clean android and node_modules and rebuild. Mostly the broken dependencies will be in node_modules:

rm -rf node_modules
yarn install # Or npm install if you aren't using yarn
cd android
./gradlew clean
cd ..
react-native run-android # Or expo start if you are on expokit

Note on react-native; make sure you are using a valid version of nodejs and the node modules are installed successfully. For me most of the time the issue was because I used updated nodejs version and the node modules weren't installed correctly.

like image 143
Ahmed Hassanien Avatar answered Nov 07 '22 13:11

Ahmed Hassanien