Questions tagged [cannot-find-symbol]

This tag is used when code returns an error message that a symbol cannot be located. These are usually compilation errors in Java.

This tag is used when code returns an error message that a symbol cannot be located. Such messages are usually associated with compilation errors in Java. See this post for a detailed description of causes and solutions: What does a "Cannot find symbol" compilation error mean?

251 questions
0
votes
1 answer

'Cannot find symbol' when sorting a stream of files using compareToIgnoreCase (JShell)

Using JShell of java 13.0.1 on Debian Stretch: import static java.nio.file.Files.*; var hm=Path.of(System.getProperty("user.home")); void p(String s) {System.out.println(s);} list(hm).sorted((a,b)->a.compareTo(b)).forEach(x ->…
ngong
  • 754
  • 1
  • 8
  • 23
0
votes
1 answer

annotation dependency from module not working

build.gradle configurations.all { resolutionStrategy { force 'com.android.support:support-annotations:23.1.1' }} Async Task import android.annotation.MainThread; import android.annotation.Nullable; import android.annotation.WorkerThread; Any…
Dylan
  • 375
  • 1
  • 2
  • 12
0
votes
1 answer

How to call a class that is present inside another .java file (Not a nested class)?

I wrote a SQL parser, the code works fine and I can see proper output at the end of parsing. Now I am trying to display the parsed output in a JSP. In order to do that, I have setup the project on IntelliJ as show in the image below. The parser I…
Metadata
  • 2,127
  • 9
  • 56
  • 127
0
votes
2 answers

(Java) Cannot Find Symbol for method

I'm having trouble with some binary tree stuff, specifically, I can't get a method defined in the original class to work in another. public class BTNode {// Invariant of the BTNode class: // 1. Each node has one reference to an E Object,…
new2java
  • 39
  • 5
0
votes
0 answers

Style not found: cannot find symbol variable

When I try to set a theme for my app with setTheme(R.style.myStyle); I get the following build error (for all of my styles): error: cannot find symbol variable myStyle The style is defined in styles.xml as followed: