'Could not read path' build failed error
See original GitHub issueIs this a bug report?
Yes
Environment
react-native -v
: 0.47.2node -v
: 8.1.2npm -v
: 5.3yarn --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:)
- cd android && gradlew clean
- cd …
- react-native run-android
- disconnect packager
- 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:
- Created 6 years ago
- Comments:9 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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