Status Update
Comments
am...@google.com <am...@google.com>
xa...@google.com <xa...@google.com> #2
On which action was that error message displayed? When running Studio, the default should be to run Gradle via the bundled JDK that comes with studio so you wouldn't need anything outside of it.
ca...@hdsoundlab.com <ca...@hdsoundlab.com> #3
xa...@google.com <xa...@google.com> #4
If the class with main
in a pure Java module or in an Android library/app module? We need to look into how IJ does this. Looking quickly at IJ itself, it seems like it builds the code with gradle but then runs the code itself somehow which could be a problem in studio.
ca...@hdsoundlab.com <ca...@hdsoundlab.com> #5
I can also add that the Android app was out of my focus this day, so unfortunately, I did not check if that "module" had similar problems.
Another issue that came up yesterday, was that the IDE could not find any java.utils.* classes even though they are there. So the code was all red for these claimed missing classes. Nevertheless, it built and run without problems! Strange.... Again it was in this pure java application. I solved that with a invalidate and cache restart, but it should not be like that, i.e. that a class present is locked out by cache algorithms. When you clean and rebuild, then the old cache must get a corresponding refreshement, I would say. Mentioned since it could be related to the other problem.
je...@google.com <je...@google.com>
so...@google.com <so...@google.com> #6
Some of the issue mentioned here look like
ga...@google.com <ga...@google.com> #7
Issue with running main()
is duplicate of
The issue with the unresolved OpenJDK symbols is
Thank you for filing the issue!
Description
AI-203.7717.56.2031.7935034, JRE 11.0.10+0-b96-7249189x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 4480.0x2800.0
AS: Arctic Fox | 2020.3.1 Patch 4; Kotlin plugin: 203-1.5.20-release-289-AS7717.8; Android Gradle Plugin: 7.0.4; Gradle: 7.0.2; Gradle JDK: version 11.0.10; NDK: from local.properties: (not specified), latest from SDK: 22.1.7171670; LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please read
Take this report as a suggestion that could save time for others.
Due to library module both part of Android app and pure Java application, and because that module did not work on all win10 laptops in the house, there was a need to install AS on a non compliant laptop in order to debug in detail.
Per mistake, the path variable was not defined on that laptop, causing the following error message: Main class (of that module) not found.
But, since I am running a pure java module with main from AS, which btw works in a perfect way, I was confused by this error message, since I thought AS has a grip on the current Java distribution. And doesn't it even have its own jdk to use?
Correct error message could have been something like: "Is java installed? The path to the java JRE could not be located. Make sure to define that path as an environment variable".
For other opsys than Win, perhaps other error messages, but the current one is confusing. It is also a bit confusing to sort this out via the FILE/PROJECT STRUCTURE command. In there, it could have been a straight forward information about which JRE/JDK AS is actually using. I am still not certain, due to this error msg.