react-native-vector-icons: Could not resolve com.android.tools.build:gradle:2.3.+
I’m getting an error after running react-native run-android which is totally fine by building the project in android 3+ studio. Does anyone have an idea why it could happen?
ps. I could open the link manually in a browser.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
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-vector-icons'.
> Could not resolve all dependencies for configuration ':react-native-vector-icons:classpath'.
> Could not resolve com.android.tools.build:gradle:2.3.+.
Required by:
rntest:react-native-vector-icons:unspecified
> Could not resolve com.android.tools.build:gradle:2.3.+.
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml'.
> Connect to 127.0.0.1:8888 [/127.0.0.1] failed: Connection refused (Connection refused)
“react-native”: “0.51.0” “react-native-vector-icons”: “^4.4.2”
OS: macOS Sierra
react-native@0.51.0 Test repository https://github.com/EclipticWld/rntest
upd: I found out that I can’t reach jcenter.bintray.com with terminal and I have no idea why because I don’t use any firewalls.
ping jcenter.bintray.com
PING dl.bintray.com (159.122.18.156): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
^C
--- dl.bintray.com ping statistics ---
9 packets transmitted, 0 packets received, 100.0% packet loss
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 37 (1 by maintainers)
Commits related to this issue
- Update react-native-vector-icons to fix intermittent build error Info: https://github.com/oblador/react-native-vector-icons/issues/605 — committed to simpledotorg/simple-experiments by divs1210 6 years ago
- Six digit ID support (#1) * WIP: six-digit-id * Goto relevant screen after entering six digit id * Bugfix: patient search via sdid * Remove unused card status * Fix: association confirmat... — committed to simpledotorg/simple-experiments by ssrihari 6 years ago
I just encountered this issue, in 2 different PCs, in 2 different projects in both. It was not going away by itself, but I fixed it doing 2 things, in my node_modules/react-native-vector-icons/android/build.gradle, added the google() repository and updated the gradle dependency, as such:
From what it seems, this will happen every now and then when jcenter decides to change things, in most cases you can just wait for it to fix itself but i’d recommend doing this for vector icons next release to avoid these sudden downtimes.
It worked for me. Upgrade “react-native-vector-icons”: “^6.0.2” in package.json
Then, do/follow the manual installation guide for android on this link.
I’m sorry, I didn’t notice I was using the wrong version in my package.json file, had it as ^5.0.0, that is why this package was using such an old gradle version. Updating react-native-vector-icons in my package.json file to at least 6.0.2 already applies exactly what I was suggesting, so anyone running into this issue, do update your package instead of doing this manually.
Also be careful that 6.1.0 requires gradle 3.2 at least to work so do take care to update when needed.
Its internet. my wifi was disconnecting when I was run android build and got this error.
As google removed
gradle v2.2.*fromjcenter.So many plugins not work.It’s works for me if you dont want to upgrade your packages or gradle.in yourandroid/build.gradle, add these linehttps://stackoverflow.com/a/53718971/7510338
thanks man this worked for me
Yes, the update is the solution but many icons are no longer valid, must be searched and modified.
https://jcenter.bintray.com/com/android/tools has been removed from production, so unless that was a mistake and they put it back, this is a temp workaround to get you back up and running until a fix is out from this library or jcenter.
Same issue for me. Unable to build on android starting this morning.
I getting this issue in today morning. Hopefully it will fix soon
i have the same problem since today 😕
Not completely. Right, it doesn’t relate to this package. Thanks!