Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I am having a difficulty with first time react-native run-android. The Error looks like this following

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

like image 448
Enkum Avatar asked Jun 28 '17 07:06

Enkum


2 Answers

If anyone else having the same problem with the above fix not working - then try installing JDK 1.8 instead of JDK 1.9 and set the JAVA_HOME environment variables. This fixed it for me.

like image 104
Isidor Nygren Avatar answered Nov 16 '22 13:11

Isidor Nygren


WINDOWS INSTRUCTIONS: To update your JAVA_HOME Environment Variable:

  1. press the Windows Key on your keyboard,
  2. type "view advanced",
  3. click on View Advanced System Settings,
  4. click Environment Variables,
  5. select JAVA_HOME,
  6. click Edit,
  7. click Browse Directory,
  8. click This PC,
  9. click C:\,
  10. click Program Files,
  11. click Java,
  12. finally, select jdk1.8.0_### (actual build # may vary)

missing JDK 1.8.0? - Google "download Java JDK" and download it from oracle.com

Cleanup Phase: Press OK, OK, OK, OK

RESTART THE COMMAND PROMPT (if you encounter any issue now, try running Command Prompt as Administrator => right click, run as admin)

Now, try again (in the correct folder):

react-native run-android
like image 40
agm1984 Avatar answered Nov 16 '22 13:11

agm1984