alinz / react-native-webview-bridge

React Native Webview with Javascript Bridge
MIT License
1.37k stars 493 forks source link

Could not find method compile() for arguments [project ':react-native-webview-bridge'] #308

Open LameesMahmoud97 opened 3 years ago

LameesMahmoud97 commented 3 years ago

I am using react-native v0.6 and I have followed the installation steps but I am still facing this error any help?

jeet-parshwa commented 3 years ago

Can you share your "./android/app/build.gradle" code here

HoaNguyenLeXuan commented 2 years ago

Yeah, I meet the same issue and this is my build.grandle

`

              buildscript {
                  ext {
                      buildToolsVersion = "30.0.2"
                      minSdkVersion = 21
                      compileSdkVersion = 30
                      targetSdkVersion = 30
                      ndkVersion = "21.4.7075529"
                  }
                  repositories {
                      google()
                      mavenCentral()
                  }
                  dependencies {
                      compile project(':react-native-webview-bridge')
                      classpath("com.android.tools.build:gradle:4.2.2")
                      classpath 'com.google.gms:google-services:4.3.10'
                      // NOTE: Do not place your application dependencies here; they belong
                      // in the individual module build.gradle files
                  }
              }

              allprojects {
                  repositories {
                      mavenCentral()
                      mavenLocal()
                      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")
                      }

                      maven { url 'https://maven.google.com' }

                      maven { url 'https://www.jitpack.io' }

                      jcenter() {
                          content {
                              includeModule("com.yqritc", "android-scalablevideoview")
                          }
                      }

                      google()
                  }
              }

`