tinycreative / react-native-intercom

React Native wrapper for Intercom.io
MIT License
407 stars 280 forks source link

Could not find com.android.tools.build:gradle:4.1.2. #434

Closed yogendrakumar96 closed 2 years ago

yogendrakumar96 commented 3 years ago

I am getting this error while running my app on android studio using physical device and I am unable to trace it why the build is failing by showing this type of error My build.gradle file looks like this :

buildscript { ext { buildToolsVersion = "28.0.3" minSdkVersion = 19 compileSdkVersion = 28 targetSdkVersion = 28 supportLibVersion = "28.0.0" } repositories { google() jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:4.1.2' classpath 'com.google.gms:google-services:4.2.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }

allprojects { repositories { mavenLocal() google() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } } }

joseph-jordan commented 3 years ago

deleting node_modules and reinstalling worked for me

tohure commented 3 years ago

deleting .gradle folder in your home_folder. Then, sync your project again. Works for me