https://kotlinlang.org logo
#android
Title
# android
a

andodeki

12/18/2020, 8:03 PM
what might be the issue here
e

ephemient

12/18/2020, 8:04 PM
probably something you're using doesn't work with JPMS
a

andodeki

12/18/2020, 8:09 PM
it's an empty project
a test project
after android studio installation and update
e

ephemient

12/18/2020, 8:11 PM
gradle version? 5.0 minimum, I believe
since JBR goes from Java 8 to Java 11 with this update
a

andodeki

12/18/2020, 8:22 PM
gradle 6.7.1 java version 8
🤔 1
e

ephemient

12/18/2020, 8:25 PM
definitely not java 8, the class the stacktrace mentions is new in java 9
a

andodeki

12/18/2020, 8:35 PM
I changed to default java 8 since java 11 was giving the same error
g

gildor

12/19/2020, 1:52 AM
Try build from console with gradle wrapper
☝️ 1
How did you change jdk?
a

andodeki

12/21/2020, 8:08 AM
sudo update-alternatives --config java from terminal
g

gildor

12/21/2020, 8:11 AM
It will not change Java version used by default (at least with default settings of AS, because it uses bundled JDK and doesn’t use JAVA_HOME)
a

andodeki

12/21/2020, 8:12 AM
or is that I need to set the path environments for android studio
g

gildor

12/21/2020, 8:17 AM
I usually just set JDK path in studio Also make sure that you set it for Gradle settings in AS
a

andodeki

12/21/2020, 8:21 AM
Screenshot from 2020-12-21 11-18-54.png
JDK path in AS
g

gildor

12/21/2020, 8:26 AM
This JDK is used for build
a

andodeki

12/21/2020, 8:33 AM
where should I set the JDK please?
g

gildor

12/21/2020, 8:54 AM
in this field
a

andodeki

12/21/2020, 8:55 AM
but its already set
or there is a separate location for the jdk?
g

gildor

12/21/2020, 9:10 AM
if it JDK which you want to use there, it’s fine
But you mentioned that you use update-alternatives, which will do nothing in case if you have such config in AS, just because AS uses bundled JDK according to your screenshot
returning back to your question. Have you tried to build with Java 8?
a

andodeki

12/21/2020, 9:31 AM
echo $JAVA_VERSION then found the directory to the path displayed on the terminal then rebuilt the project and it worked
Screenshot from 2020-12-21 12-32-04.png
why is Navigation unresolved
g

gildor

12/21/2020, 10:42 AM
unresolve navigation hardly related to your original build issue
a

andodeki

12/21/2020, 10:42 AM
yeah
not related
g

gildor

12/21/2020, 10:43 AM
looks that you just don’t have proper import for it