Skip to content

Updates Java version troubleshooting #1991

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions doc/source/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,26 @@ the build (e.g. if buildozer was previously used). Removing this
directory should fix the problem, and is desirable anyway since you
don't want it in the APK.

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Errors related to Java version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This occurs due to a java version mismatch, it should be fixed by
installing Java 8 (e.g. the openjdk-8-jdk package on Ubuntu).
The errors listed below are related to Java version mismatch, it should be
fixed by installing Java 8.

java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- :code:`java.lang.UnsupportedClassVersionError: com/android/dx/command/Main`
- :code:`java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder`
- :code:`java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema`

Also make sure you're running Java 8, on OS X::
On Ubuntu fix it my making sure only the :code:`openjdk-8-jdk` package is installed::

apt remove --purge openjdk-*-jdk
apt install openjdk-8-jdk

In the similar fashion for macOS you need to install the :code:`java8` package::

brew cask install java8


JNI DETECTED ERROR IN APPLICATION: static jfieldID 0x0000000 not valid for class java.lang.Class<org.renpy.android.PythonActivity>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down