question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Could not read path' build failed error

See original GitHub issue

Is this a bug report?

Yes

Environment

  1. react-native -v: 0.47.2
  2. node -v: 8.1.2
  3. npm -v: 5.3
  4. yarn --version : 0.27.5

Then, specify:

  • Target Platform: Android
  • Development Operating System: Windows 10 64 bit
  • Build tools: Both android emulator and physical Galaxy S6

Steps to Reproduce

(Write your steps here:)

  1. cd android && gradlew clean
  2. cd …
  3. react-native run-android
  4. disconnect packager
  5. react-native run-android

Expected Behavior

Build is expected to run just fine the second time, just like the first time.

(Write what you thought would happen.)

Actual Behavior

When I run react-native run-android, the first time I run it, everything runs fine. If I stop the packager and run react-native run-android a second time, I get this error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not read path 'C:\ig3\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-fr-rCA'.
> C:\ig3\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-fr-rCA

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

I can do ‘cd android && gradlew clean’ then the build will run fine, but again the next time I run, I will get the same error. It is always the second time I run my build after doing gradlew clean, I get the same error.

Any help would be much appreciated. Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
ghostcommented, Feb 26, 2018

For me the issue is solved when I’m closing Android Studio. I’m guessing that Android Studio is keeping handle to the files and paths which preventing react-native run-android run correctly.

1reaction
PabiMoloicommented, Feb 7, 2018

Hey guys, had the same issue when i was renaming my packages in android studio, what worked for me can be found from this link https://stackoverflow.com/questions/23025433/how-to-clear-gradle-cache/30450020#30450020

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle Build Fails with "Could not read path" When Instant ...
Tap "Apply", then "OK", then do a Gradle Sync by tapping gradle sync icon in AStudio; "Build=>clean Project". Workaround. The current workaround ...
Read more >
Troubleshooting builds - Gradle User Manual
If gradle --version works, but all of your builds fail with the same error, it is possible there is a problem with one...
Read more >
PKIX path building failed error message
Is a common error message reported by the Java Virtual Machine. This is caused when the Java environment does not have information about...
Read more >
Bazel build fails with "" errors [126764883] - Visible to Public
TXT (No such file or directory) Unable to read the Android NDK at ${REPO_ROOT}/prebuilts/studio/sdk/darwin/ndk-bundle, the path may be invalid.
Read more >
Unable to connect to SSL services due to "PKIX Path Building ...
Consequently, Atlassian Support cannot guarantee providing any support for it. ... ValidatorException: PKIX path building failed: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found