Gradle找不到标准的React类

时间:2017-01-18 01:08:38

标签: android facebook reactjs react-native

我正在使用Native模块为React Native构建库。我正在从node_modules连接库,似乎已安装。但我无法从我的项目中获取库,获得

Error:(8, 30) Gradle: error: cannot find symbol class ReactPackage

我有build.gradle脚本

apply plugin: 'com.android.library'

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

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 3
        versionName "0.1.2"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    lintOptions {
       warning 'InvalidPackage'
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'lib')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.facebook.react:react-native:+@aar'
    compile 'com.google.android.gms:play-services-gcm:+'
}
allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven {
            // All of React Native (JS, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

enter image description here

我该如何解决这个问题?

0 个答案:

没有答案