2
votes

I am trying to use react-native-fbsdk in my project.

following the config in react-native-fbsdk, I work fine in react-native run-ios but react-native run-android.

Here is the error message

> Configure project :react-native-vector-icons
The CompileOptions.bootClasspath property has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the CompileOptions.bootstrapClasspath property instead.


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-vector-icons'.
      > Failed to notify project evaluation listener.
         > com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V

I try finding the keyword CompileOptions.bootClasspath in all file with *.gradle but nothing has been found.

Is there a solution with this issue? Thank you so much!

I have following versions installed:

[email protected]

[email protected]

Here is my build.gradle in ProjectName/android. I guess I'm using gradle 2.2.3 in this project.

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

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

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

I've try changing the version in the file and run. It get another error message.

> Could not resolve all files for configuration ':classpath'.
   > Could not find com.android.tools.build:gradle:4.2.
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/build/gradle/4.2/gradle-4.2.pom
         https://jcenter.bintray.com/com/android/tools/build/gradle/4.2/gradle-4.2.jar
     Required by:
         project :
1
What version of gradle are you using?Lucas Z.
the gradle-wrapper.properties in android/gradle/wrapper. distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-rc-2-all.zip I think I am using v4.3.Alex Ian
Am having same problem please someone help out. Using gradle Gradle 2.10 ------------------------------------------------------------ Build time: 2016-01-26 15:17:49 UTC Build number: none Revision: UNKNOWN Groovy: 2.4.5 Ant: Apache Ant(TM) version 1.9.6 compiled on July 8 2015 JVM: 1.8.0_151 (Oracle Corporation 25.151-b12) OS: Linux 4.4.0-38-generic amd64FONGOH MARTIN

1 Answers

-1
votes

i had this same issue with my project. forget everything and just delete this project. and create new project using this link. [ https://facebook.github.io/react-native/docs/getting-started.html ]

and MAKE SURE THAT you first install jdk and android studio completely and also set environment variable for both before hit the command "react-native init AwesomeProject".

this works for me...i hope it works for you as well