what might be the issue here
# android
a
what might be the issue here
e
probably something you're using doesn't work with JPMS
a
it's an empty project
a test project
after android studio installation and update
e
gradle version? 5.0 minimum, I believe
since JBR goes from Java 8 to Java 11 with this update
a
gradle 6.7.1 java version 8
🤔 1
e
definitely not java 8, the class the stacktrace mentions is new in java 9
a
I changed to default java 8 since java 11 was giving the same error
g
Try build from console with gradle wrapper
☝️ 1
How did you change jdk?
a
sudo update-alternatives --config java from terminal
g
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
or is that I need to set the path environments for android studio
g
I usually just set JDK path in studio Also make sure that you set it for Gradle settings in AS
a
Screenshot from 2020-12-21 11-18-54.png
JDK path in AS
g
This JDK is used for build
a
where should I set the JDK please?
g
in this field
a
but its already set
or there is a separate location for the jdk?
g
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
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
unresolve navigation hardly related to your original build issue
a
yeah
not related
g
looks that you just don’t have proper import for it