1

Unable to run the flutter code getting error

Failed to capture snapshot of input files for task 'javaPreCompileDebug' property 'compileClasspaths' during up-to-date check. > Error snapshotting jar [flutter.jar] Finished with error: Gradle build failed: 1

4
  • At which directory did you install Flutter? C:\Program Files doesn't work because Flutter needs write permission in its install directory. Commented Jul 19, 2018 at 6:14
  • i am using Ubuntu and installed directory is having 777 permission Commented Jul 19, 2018 at 6:15
  • 1
    Try git clean -xfd git pull flutter doctor in your Flutter install directory. Commented Jul 19, 2018 at 6:16
  • 1
    Thanks @GünterZöchbauer it worked Commented Jul 19, 2018 at 6:20

1 Answer 1

1

Try

git clean -xfd 
git pull 
flutter doctor 

in your Flutter install directory to fix your Flutter installation.

Sign up to request clarification or add additional context in comments.

3 Comments

As it was showing flutter update was 50 days old and on pull it get upgraded to new version which solve my problem
Glad to hear. Perhaps flutter upgrade had been enough already.
yes first i run 'flutter docter' which gave me the idea to upgrade then i use 'git clean -xfd git pull'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.