1

I'm building library for React Native using Native modules. I'm connecting library from node_modules and it seems installed. But I can't acess library from my project, getting

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

I have following build.gradle script

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

How can I fix this?

sigrlami
  • 1,822
  • 1
  • 17
  • 35
  • I don't know I can help or not. Please look think two links. http://stackoverflow.com/q/34995079/5241603 And http://stackoverflow.com/q/40757931/5241603 – K.Sopheak Jan 18 '17 at 01:47

0 Answers0