React-Native-无法通知项目评估侦听器 [英] React-Native- Failed to notify project evaluation listener
本文介绍了React-Native-无法通知项目评估侦听器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用gradle 4.3在Windows 7上构建react-native应用程序时,出现以下错误,不确定问题出在哪里,任何帮助都将被取消.
Using gradle 4.3 to build a react-native app on windows 7 and I get the below error, Not sure what the issue is, any help will be apreciated.
C:\Users\username\AwesomeProject>react-native run-android
Scanning folders for symlinks in C:\Users\username\AwesomeProject\node_modules (62ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Starting a Gradle Daemon (subsequent builds will be faster)
Download https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 0s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
推荐答案
升级build.gradle项目文件; com.android.tools.build:gradle版本从2.2.3开始使用,如下所示:
Upgrade your build.gradle project file; com.android.tools.build:gradle version from 2.2.3 to use as below:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
您可能会或也可能不会遇到此问题,请更新您的构建工具.
You may or may not, also encounter this issue, please update your build tools.
The SDK Build Tools revision (23.0.1) is too low for project ':app'. Minimum required is 25.0.0
解决方案:在项目/app/build.gradle
中进行如下更新:
Solution: update inside your project /app/build.gradle
as below:
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
这篇关于React-Native-无法通知项目评估侦听器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文