web-dev-qa-db-fra.com

React-Native - Échec de la notification de l'auditeur d'évaluation du projet

En utilisant gradle 4.3 pour créer une application native pour Windows 7 et je reçois l'erreur ci-dessous, je ne sais pas quel est le problème, toute aide sera appréciée.

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
7
LeoG

Mettez à niveau votre fichier de projet build.gradle; com.Android.tools.build:gradle version de 2.2.3 à utiliser comme ci-dessous:

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
    }
}

Vous pouvez ou non rencontrer ce problème, veuillez mettre à jour vos outils de construction.

The SDK Build Tools revision (23.0.1) is too low for project ':app'. Minimum required is 25.0.0

Solution: mettez à jour votre projet /app/build.gradle comme ci-dessous:

Android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"
20
Sunil Kumar