K
K
KnightForce2017-05-10 23:47:46
Android
KnightForce, 2017-05-10 23:47:46

React Native won't run on emulator?

I did everything as in the official documentation.
Set environment variables.
I'm running the Genymotion emulator.
In the console I write react-native run-android, it gives this:


:app:mergeDebugAssets
:app:generateDebugResValues
​​:app:generateDebugResources
:app:mergeDebugResources
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:incrementalDebugJavaCompilationSafe
-guard
:app:compileDebugJava:WithJavac eg outputs have changed,
no previous execution, etc.).
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_131
contains a valid JDK installation.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 14 mins 47.488 secs
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/andro...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KnightForce, 2017-05-11
@KnightForce

The thing is that if you set it as it is written in the official documentation, jre is installed, but you need jdk + set the JAVA_HOME environment variable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question