How can I install java 11 on Ubuntu 22.04?

160 views
Skip to first unread message

Roy Somoza

unread,
Mar 27, 2023, 1:31:32 PM3/27/23
to Kivy users support
Greetings. I'm trying to create an apk with C4K example https://github.com/Android-for-Python/c4k_photo_example. It asks me to have java 11 installed https://github.com/android-for-python/c4k_photo_example [DEBUG]: * What went wrong: [DEBUG]: A problem occurred evaluating root project 'C4K_FOTO'. [DEBUG]: > Failed to apply plugin 'com.android.internal.application'. [DEBUG]: > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. [DEBUG]: You can try some of the following options: [DEBUG]: - changing the IDE settings. [DEBUG]: - changing the JAVA_HOME environment variable. [DEBUG]: - changing `org.gradle.java.home` in `gradle.properties`. Try to install java 11 on Ubuntu version 22.04 using apt ~$ sudo apt install openjdk-11-jre Reading package lists... Done Building dependency tree... Done Reading state information... Done openjdk-11-jre is already the newest version (11.0.18+10-0ubuntu1~22.04). The following packages were automatically installed and are no longer required: libflashrom1 libftdi1-2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded. But when I check the java version it tells me that I still have version 1.8 installed ~$ java-version openjdk version "1.8.0_362" OpenJDK Runtime Environment (build 1.8.0_362-8u362-ga-0ubuntu1~22.04-b09) OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode) How can I install java 11 on Ubuntu 22.04?

Robert

unread,
Mar 27, 2023, 4:02:57 PM3/27/23
to Kivy users support
Reply all
Reply to author
Forward
0 new messages