Vilma De battista
Vilma De battista

Reputation: 123

Kivy Apk build with buildozer error: # Java compiler (javac) not found, please install it

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 8

  1. Using: 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.
    
  2. 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.
    
  3. 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?

Upvotes: 11

Views: 22438

Answers (3)

ouss05
ouss05

Reputation: 1

######check this out. It's working ##########

  1. Download Java Open your web browser Type URL: https://www.oracle.com/java/technologies/javase-downloads.html... to go to Oracle download page. This will lead you <> page
    Click on button “ JDK download ” for Java SE update 4.
    Accept oracle license agreement Find and click on the correct jdk download link right for your operating system to download Save the file to disk

NOTE >>>>> if you find this word (version) which means you should change it depending on your downloaded version ---- if you use linux

2 cd Downloads

3 ls

4 sudo dpkg -i jdk-(VERSION)_linux-x64_bin.deb

5 sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/(version)/bin/java 1

6 sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/(VERSION)/bin/javac 1

<>>>if it doesn't work then u essentially need to change the (version) in the commands above as mentioned at the note

Upvotes: 0

trojek
trojek

Reputation: 3228

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

Upvotes: 14

inclement
inclement

Reputation: 29488

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.

Upvotes: 0

Related Questions