Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAILURE: Build failed with an exception. #15552

Closed
marcuxyz opened this issue Aug 18, 2017 · 23 comments
Closed

FAILURE: Build failed with an exception. #15552

marcuxyz opened this issue Aug 18, 2017 · 23 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@marcuxyz
Copy link

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

@hramos
Copy link
Contributor

hramos commented Aug 18, 2017

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 hramos closed this as completed Aug 18, 2017
@orinmurphy
Copy link

@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

@vbarinov
Copy link

Switching from JDK9 to JDK8 (Windows 10 x64, gradle 2.14.1 ) solved the issue for me.

@orinmurphy
Copy link

@vbarinov I've done that, but it has not made any difference.

@amjadkhan120
Copy link

@orinmurphy did you able to solve this? i am also facing the exact same issue, JDK9 installed

@orinmurphy
Copy link

@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

@azamatsmith
Copy link

azamatsmith commented Sep 28, 2017

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.

@amjadkhan120
Copy link

Thanks @orinmurphy @azamatsmith, its JDK9 which is causing the issue, Now its working fine after installing JDK8.

@wongjiahau
Copy link

Thanks ! I was having this issue as well

@jetonk
Copy link

jetonk commented Oct 6, 2017

@vbarinov Solution fixed my issue, now is working perfectly.. 👍

@xu6148152
Copy link

After deleted jdk-9 will be ok, but why RN can't support jdk-9?

@incredifan
Copy link

+1 for removing JDK9

@hvdscheer
Copy link

Removing jdk9 is the solution for me

@ejazahmed95
Copy link

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.

@ber4444
Copy link

ber4444 commented Dec 21, 2017

It's a generic Android issue that has nothing to do with React Native.

@bjornua
Copy link

bjornua commented Jan 15, 2018

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.

@ber4444
Copy link

ber4444 commented Jan 16, 2018

yeah, some technical writer got into wishful thinking

@anthonyhumphreys
Copy link

@bjornua yeah, surprised this hasn't been changed, this issue has been around for a while...

@bkleef
Copy link

bkleef commented Mar 23, 2018

Please support JDK 9/10.

@iBotasky
Copy link

Same issue, please support JDK 10.

@kbarodiya
Copy link

Facing same issue with JDK 10. Please add support for JDK 10 and update the doc too.

@PandaGeek1024
Copy link

facing the same issue here, please support JDK 9 please.

@vladsholokhov
Copy link

Same issue. JDK 10.

@facebook facebook locked as resolved and limited conversation to collaborators Aug 18, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests