Building and installing the app on the device (cd android && ./gradlew installDebug)...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/home/marcus/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv/gradle-2.14.1/lib/gradle-base-services-2.14.1.jar) to method java.lang.ClassLoader.getPackages()
WARNING: Please consider reporting this to the maintainers of org.gradle.internal.reflect.JavaMethod
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
Failed to notify project evaluation listener.
javax/xml/bind/annotation/XmlSchema
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: 3.881 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/android-setup.html
Follow step by step tutorial react native
Hey, thanks for reporting this issue!
It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.
I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!
@hramos im having the exact same issue as @MarcusMann.
1: react-native init ReactNativeProject
2: cd /ReactNativeProject
3: npm install
4: react-native run-android
Switching from JDK9 to JDK8 (Windows 10 x64, gradle 2.14.1 ) solved the issue for me.
@vbarinov I've done that, but it has not made any difference.
@orinmurphy did you able to solve this? i am also facing the exact same issue, JDK9 installed
@amjadkhan120 yes I just solved this issue. I had two versions of Java installed, so i removed JDK9 and that fixed the issue for me. Now I am just using JDK8
I also had two JDK versions installed (8 & 9), I removed 9 and everything started working.
To uninstall:
Navigate to /Library/Java/JavaVirtualMachines and remove the v9 directory
cd /Library/Java/JavaVirtualMachines
sudo rm -rf {yourVersionName}.jdk
If you do not have version 8 in that directory you will need to install JDK8.
Thanks @orinmurphy @azamatsmith, its JDK9 which is causing the issue, Now its working fine after installing JDK8.
Thanks ! I was having this issue as well
@vbarinov Solution fixed my issue, now is working perfectly.. 馃憤
After deleted jdk-9 will be ok, but why RN can't support jdk-9?
+1 for removing JDK9
Removing jdk9 is the solution for me
No need to remove JDK9, just update your JAVA_HOME and PATH variable to point to JDK8.
Also, in the path variable, make sure jdk8 path has higher priority than javaclasspath ( added by oracle when you first install JAVA, this will still point to your earlier install version i.e; jdk9 ).
To switch between versions, just change the priority order in Path environment variable.
It's a generic Android issue that has nothing to do with React Native.
https://facebook.github.io/react-native/docs/getting-started.html says "Download and install JDK 8 or newer". It should probably be explicit that only "JDK 8" will work.
yeah, some technical writer got into wishful thinking
@bjornua yeah, surprised this hasn't been changed, this issue has been around for a while...
Please support JDK 9/10.
Same issue, please support JDK 10.
Facing same issue with JDK 10. Please add support for JDK 10 and update the doc too.
facing the same issue here, please support JDK 9 please.
Same issue. JDK 10.
Most helpful comment
Switching from JDK9 to JDK8 (Windows 10 x64, gradle 2.14.1 ) solved the issue for me.