1

After extensive google-ing and searching SO, I was not able to sufficiently find a solution to my problem.

The issue:

My project currently has Databinding v2 enabled and in my XML I do have 2 way data binding for view model properties.

Android Studio (v3.5.3) is able to compile the project fine and doesn't have any errors

Using the command line tool ./gradlew assemble<Release_type> would result in

javax/xml/bind/JAXBException

The solution:

There were some hints on Google and SO regarding a change made from Java8 -> Java11 regarding this library. I'm not entirely sure what that change was but Java11 doesn't include whatever library that is needed to compile the app. Upon further inspection, I realized I was running OpenJDK 11 and not OpenJDK 8. According to various sources, the solution to this problem was to install OpenJDK 8.

Steps to success:

  1. Uninstall OpenJDK 11 or greater
  2. Run the following command
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
  1. Now running ./gradlew assemble<release_type> should work as expected.

What this solves

  1. fastlane not being able to build
  2. gradlew not able to build

Conclusion

Further google searching led me to a couple of articles related to OpenJDK 11. Apparently, Android Studio doesn't support OpenJDK 11 yet but Android Studio 4.x will. - reference to SO post

I know this isn't an "actual" question but I leave this here in hopes that anyone else super frustrated (like myself) finds this potential solution useful and hopefully Google indexes this article :)

sepp2k
  • 363,768
  • 54
  • 674
  • 675
TimD
  • 1,090
  • 11
  • 22

1 Answers1

1

Please see above for detailed Solution

TLDR

Steps to success:

Uninstall OpenJDK 11 or greater Run the following command brew tap AdoptOpenJDK/openjdk brew cask install adoptopenjdk8 Now running ./gradlew assemble should work as expected.

TimD
  • 1,090
  • 11
  • 22
  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - [From Review](/review/low-quality-posts/25149762) – Nathan Jan 21 '20 at 14:38
  • @Nathan as stated in the answer, the details were inside the original question. I have edited to reflect the exact same solution in the answer section. I did not use the "post answer button", I ticked the "QA style" when formulating the question. Thank you for your feedback. – TimD Jan 21 '20 at 15:00