【发布时间】:2018-04-19 13:27:53
【问题描述】:
我正在尝试在我的项目中使用 react-native-fbsdk。
按照 react-native-fbsdk 中的config,
我在react-native run-ios 工作正常,但react-native run-android。
这是错误信息
> 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
我尝试在所有带有*.gradle 的文件中查找关键字CompileOptions.bootClasspath,但没有找到任何内容。
这个问题有解决方案吗?非常感谢!
我安装了以下版本:
react-native@0.49.3
react-native-fbsdk@0.6.3
这是我在 ProjectName/android 中的 build.gradle。我想我在这个项目中使用的是 gradle 2.2.3。
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"
}
}
}
我尝试更改文件中的版本并运行。 它收到另一条错误消息。
> 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 :
【问题讨论】:
-
你用的是什么版本的gradle?
-
android/gradle/wrapper 中的
gradle-wrapper.properties。distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-rc-2-all.zip我想我正在使用 v4.3。 -
我有同样的问题,请有人帮忙。使用 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 amd64
标签: facebook react-native react-native-android react-native-fbsdk