0

I have been used vector icons in my react native projects and it was well done,but before some hours while doing the build (react-native run-android) for android platform I get this error.

Did these steps to add vector Icons:

npm install react-native-vector-icons –save

react-native link

Can anyone help to resolve this issue?

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-vector-icons'.
> Could not resolve all files for configuration ':react-native-vector-icons:classpath'.
   > Could not find any matches for com.android.tools.build:gradle:2.3.+ as no versions of com.android.tools.build:gradle are available.
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml
         https://jcenter.bintray.com/com/android/tools/build/gradle/
     Required by:
         project :react-native-vector-icons

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

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
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
Author
  • 425
  • 1
  • 4
  • 16

1 Answers1

0

Add this to build.gradle These issue is because these package are released for some period. It can solve the issue of image-picker and vector-icons

subprojects {
    if (project.name.contains('react-native-image-picker') ||
        project.name.contains('react-native-vector-icons')) {
        buildscript {
            repositories {
                jcenter()
                maven { url "https://dl.bintray.com/android/android-tools/"  }
            }
        }
    }
}
Author
  • 425
  • 1
  • 4
  • 16