wuyunqiang / ReactNativeUtil

30 stars 6 forks source link

gradle升级4.1运行报错 #47

Open wuyunqiang opened 6 years ago

wuyunqiang commented 6 years ago

gradleupdatebug.png

fix: 在android/build.gradle文件里面和下面对比 将缺少的添加上即可

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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