11

I'm trying package my kivy app (python3) but when i run the command buildozer -v android debug see this error

# Cwd /home/javier/.buildozer/android/platform/android-sdk
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.se.ee not found
# Command failed: /home/javier/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager tools platform-tools
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

I have this Java version

$ java --version
openjdk 11.0.2 2019-01-15
OpenJDK Runtime Environment (build 11.0.2+9-Ubuntu-3ubuntu118.04.3)
OpenJDK 64-Bit Server VM (build 11.0.2+9-Ubuntu-3ubuntu118.04.3, mixed mode, sharing)

I downloaded only sdkmanager Command line tools from here and put it in my root path but i don't had success.

I Saw in this post a solution and i did it but i don't solve the error.

I has a virtualenv with all dependencies installed. Also i edited the buildozer.spec and i was custom it

The Virtualenv is:

(envAppSinapsis)~/AppSin$ pip freeze
certifi==2019.3.9
chardet==3.0.4
Cython==0.28.2
docutils==0.14
idna==2.8
Kivy==1.10.1
Kivy-Garden==0.1.4
psycopg2==2.7.6.1
psycopg2-binary==2.7.6.1
pygame==1.9.4.dev0
Pygments==2.3.1
requests==2.21.0
urllib3==1.24.1

I think that error is related to something related to JAVA but I do not know what. I would appreciate your helps, and please, excuse my bad English.

I am working in Ubuntu 18

UPDATE Print Screen Error

Javier Valero
  • 113
  • 1
  • 2
  • 7

3 Answers3

21

Up until a few days ago if you had installed openjdk-11-jdk/jre from the Ubuntu repos you would have found it was actually a version of Java 10 (https://askubuntu.com/questions/1037646/why-is-openjdk-10-packaged-as-openjdk-11).

java.se.ee has been deprecated in Java 9, 10 and removed in Java 11 (https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html)

Unfortunately there is no simple way to get the Android tools like sdkmanager or avdmanager running with Java 11 yet.

I was able to get buildozer running on Ubuntu again with Java 10:

  • Download Java 10 Linux x64 JDK (.tar.gz) from http://jdk.java.net/java-se-ri/10
  • Untar: tar -xzvf jdk-10_linux-x64_bin_ri.tar.gz
  • Set PATH: export PATH=/path/to/inflated/jdk-10/bin:$PATH
Steve Foerster
  • 481
  • 4
  • 6
13

was getting error License not accepted for SDK Build tools etc

solved by Installing

  1. SDK Command Line Tools
  2. Google Play licensing services

in SDK Manager > SDK Tools

helped me after getting frustrated for 2 hours, and hearing from everyone that only way is to downgrade Java

Akshay Vijay Jain
  • 13,461
  • 8
  • 60
  • 73
  • 7
    It should be mentioned that if you previously edited JAVA_OPTS using 'export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'' Then you need to set it back to: export JAVA_OPTS = '' – Harshfi6 May 23 '21 at 06:49
  • Of all the answers. Yours was the one that worked. There was no option to accept the lisense without the license server apparently – Javasamurai Jan 23 '22 at 17:45
-6

You can solve this error by downgrading Java or by executing the below command in your terminal.

export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'

Also, don't download the platform tools yourself, let buildozer take care of that.

If the above command doesn't work try deleting the buildozer files from your app and rebuilding your application.

44za12
  • 9
  • 3
  • 1
    I executed the command indicated above but does not work. I'm downloading the **Java 10 Linux x64 JDK (.tar.gz)** how indicated me @steve in the first answer and i wait thats work... I will actualizate the question, showing more information in a printscreen – Javier Valero Apr 23 '19 at 14:54
  • 2
    Error occurred during initialization of boot layer java.lang.module.FindException: Module java.se.ee not found – Alix Dec 17 '19 at 13:22
  • I made the mistake of executing your answer and now when I execute: (flutter doctor --android-licenses),.. I have this error: Error occurred during initialization of boot layer java.lang.module.FindException: Module java.se.ee not found. How can I revert this? – Reinier Garcia Jun 14 '21 at 18:30