Kivy Apk build with buildozer error: # Java compiler (javac) not found, please install it
Solution 1
The error seems fairly explicit - install javac.
This is probably in a java related package of your distro's package manager. It probably has search functionality to find the one you want.
Solution 2
You need to install Java Development Kit. If you are using Debian based system (Ubuntu, Linux mint, etc.) just type in terminal: sudo apt-get install openjdk-8-jdk
. On windows you must visit Java website and download Java JDK manually.
To check if you have installed Java JDK, type in console javac -version
, you should see message like this: javac 1.8.0_91
Vilma De battista
Updated on July 25, 2022Comments
-
Vilma De battista almost 2 years
I'm trying to build an apk of my kivy project. I have installed buildozer in python 2.7 Using PyCharm, then I built the
.spec
, but when I tried to create the apk, I got these results: i have insatalled jdk7 and 8Using:
buildozer Android debug
#Check configuration tokens # Ensure build layout # Check configuration tokens # Preparing build # Check requirements for android # Java compiler (javac) not found, please install it.
Using:
buildozer -v Android debug
# Check configuration tokens # Ensure build layout # Check configuration tokens # Read available permissions from api-versions.xml # Preparing build # Check requirements for android # Run 'dpkg --version' # Cwd None /bin/sh: dpkg: comando non trovato # Search for Git (git) # -> found at /usr/bin/git # Search for Cython (cython) # -> found at /usr/bin/cython # Search for Java compiler (javac) # Java compiler (javac) not found, please install it.
Using:
buildozer Android debug deploy run
# Check configuration tokens # Ensure build layout # Check configuration tokens # Preparing build # Check requirements for android # Java compiler (javac) not found, please install it.
How do I get this to work?
-
Vilma De battista over 8 yearsjre8-jre7-jdk7opendjdk-jdk8openjdk-
-
oxidworks over 7 yearspackage name: openjdk-8-jdk
-
Pablo Díaz over 4 yearsI'm running on debian and I get "E: Unable to locate package openjdk-8-jdk"
-
Mape about 4 yearsBuildozer doesn't require you to have openjdk-8. Take a newer version that is available, for example
sudo apt-get install openjdk-14-jdk
. Tested on Debian bullseye.