Issue
Yesterday I could run android app perfectly but I don't know why, this morning I did react-native run-android like all days I work and it threw me BUILD FAILED with:
- What went wrong: A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'. A problem occurred configuring project ':react-native-device-info'. Could not find runtime.jar (android.arch.lifecycle:runtime:1.0.0). Searched in the following locations: https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.jar
Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html
I have been searching solutions to the error but they doesn't works. One of the things I tried was this but with no solution:
chmod 755 android/gradlew
I emphasize that yesterday was working normaly, is a project with so much time ago. I think could be something related with the sdk but I don't move very well with it. Someone know what could be? In IOS works perfectly.
Solution
Same problem here today. I just clean gradle cache and got the same exception.
$ ./gradlew clean Incremental java compilation is an incubating feature.
FAILURE: Build failed with an exception.
- What went wrong:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'. A problem occurred configuring project ':react-native-device-info'. Could not find runtime.jar (android.arch.lifecycle:runtime:1.0.0). Searched in the following locations: https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.jar
The file is missing here :https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/
// Update solution found here
Just set on project buikd.gradle :
maven { url 'https://maven.google.com' }
Before the jcenter() and everything is OK.
allprojects { repositories { mavenLocal() maven { url 'https://maven.google.com' } jcenter() maven { url "$rootDir/../node_modules/react-native/android" } } }
from https://github.com/rebeccahughes/react-native-device-info/issues/414
Answered By - vdumontier
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.