redhat-developer / redhat-developer/vscode-java
Type checking and other features not working with Gradle project
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
I used this extension to work on a Maven project originally, and it worked very well. The main features I'm interested in are type-checking (getting a warning if I call a method with bad arguments, or if I call a method that doesn't exist, say) and import warnings (being told I need to import something before using it, and being able to add the import with a single click).
Now I'm working on a Gradle project (an Android project), and these features no longer work. When I open the developer console, I see this type of error every time I open a .java file:
Error: src/main/java/com/google/android/exoplayer/demo [in demo] is not on its project's build path
Environment
- Operating System: Ubuntu 18.10
- JDK version: 1.8
- Visual Studio Code version: 1.31.1
- Java extension version: 0.39.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported error when opening a Java file in the Gradle-based Android project, using the environment details in the issue. Trace how the project build path is detected and compare it with the working Maven case; done means type-checking and import warnings work without the build-path error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100