Android reactNative中运行模拟器和gradle时出现问题

Android reactNative中运行模拟器和gradle时出现问题,android,react-native,Android,React Native,我在模拟器内运行应用程序时遇到问题 并给出以下错误: (我在Genymotion和nox模拟器上进行了测试) 似乎您使用了错误的JDK版本。检查JAVA_主页以使用JDK 1.8,您应该访问 user>>程序数据>>渐变 删除缓存 然后,在android studio中运行该程序谢谢您的帮助您是否react native init yourproject=>cd yourproject=>react native run android?? none C:\Users\Sajjad Alavi\

我在模拟器内运行应用程序时遇到问题 并给出以下错误: (我在Genymotion和nox模拟器上进行了测试)


似乎您使用了错误的JDK版本。检查JAVA_主页以使用JDK 1.8,您应该访问
user>>程序数据>>渐变
删除缓存
然后,在android studio中运行该程序

谢谢您的帮助您是否
react native init yourproject
=>
cd yourproject
=>
react native run android
??
none
C:\Users\Sajjad Alavi\Desktop\n\test1>npm run android

> @ android C:\Users\Sajjad Alavi\Desktop\n\test1
> react-native run-android

info JS server already running.
info Building and installing the app on the device (cd android && gradlew.bat ap
p:installDebug)...

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Sajjad Alavi\Desktop\n\test1\android\app\build.gradle' line
: 1

* What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : U
nsupported major.minor version 52.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with
Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:com
mand_line_warnings

BUILD FAILED in 6s
error 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/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag
for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ android: `react-native run-android`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ android script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Sajjad Alavi\AppData\Roaming\npm-cache\_logs\2019-09-11T16
_13_49_689Z-debug.log