Reputation: 67
When trying to build I get this error:
Could not find any matches for com.android.tools.build:gradle:2.2.+ 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-image-picker
However when I change the tools version in the Project gradle.build to 2.2.3 I get this error:
Could not find method implementation() for arguments [directory 'libs'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Upvotes: 6
Views: 1761
Reputation: 455
add this to build.gradle.
I think my issue is because they sent new release.
It can fix vector-icons and image-picker issue
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/" }
}
}
}
}
Upvotes: 0
Reputation: 67
They sent a new release and everything was fixed. [email protected]
Upvotes: 0
Reputation: 455
Edit your build.gradle as following.
subprojects { subproject ->
if (subproject.name.contains('react-native-image-picker')){
buildscript {
repositories {
maven { url "https://dl.bintray.com/android/android-tools/" }
}
}
}
}
Upvotes: 2