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?

220 questions
447
votes
16 answers

What does a "Cannot find symbol" or "Cannot resolve symbol" error mean?

Please explain the following about "Cannot find symbol", "Cannot resolve symbol" or "Symbol not found" errors (in Java): What do they mean? What things can cause them? How does the programmer go about fixing them? This question is designed to seed…
Stephen C
  • 632,615
  • 86
  • 730
  • 1,096
23
votes
19 answers

Cannot resolve symbol default_web_client_id in Firebase's Android Codelab

I am trying to learn Firebase, so I went through the Android Codelab. The project they gave me however, had an error: Cannot resolve symbol default_web_client_id And I didn't know how to solve it, since I didn't know the value of…
Ali Bdeir
  • 4,591
  • 9
  • 46
  • 101
10
votes
1 answer

Android BiometricPrompt: Cannot resolve symbol PromptInfo

When I copied the following code from this developer.android.com tutorial about adding biometric authentication in your android app: BiometricPrompt.PromptInfo promptInfo = new BiometricPrompt.PromptInfo.Builder() …
10
votes
6 answers

How to use a Java class in JSP scriptlet? Error says the class cannot be resolved to a type

I have written a sample JSP file in Eclipse and a Java file and was trying to call the Java class inside my JSP but it is not working. The code of the JAVA file is as follows: TestJava.jva public class TestJava { public void test(String msg) …
Joy
  • 3,151
  • 10
  • 37
  • 79
8
votes
2 answers

IntelliJ cannot resolve symbol "newFixedThreadPool"

I'm new to IntelliJ and Java in general. I'm trying to learn multithreading and I came across the Executors class. So I wanted test this, here is a sample of my code. import java.util.List; import java.util.concurrent.ExecutorService; import…
Irindul
  • 370
  • 1
  • 6
  • 19
6
votes
2 answers

import com.amazonaws.services.dynamodbv2.document.DynamoDB; the document part of the import cannot be resolved

I tried to update my dynamodb using aws but I am not able to create a dynamodb object or a table object as the import com.amazonaws.services.dynamodbv2.**document**.* does not register document but it reads all the other imports: import…
4
votes
6 answers

Why android cannot resolve symbol but it still works?

I have a FrameLayout that has a ripple effect on click. To do this I have this tag on my FrameLayout: android:foreground="?attr/selectableItemBackgroundBorderless" The problem is that I get an error that says: "Cannot resolve symbol…
Ravers
  • 750
  • 2
  • 10
  • 35
4
votes
3 answers

Why do I get an error: cannot find symbol variable in R class

The following source code should make a picture and display it on the screen. But I get some errors. Cannot resolve symbol 'activity_fullscreen', the same for imageView1, dummy_button, fullscreen_content and fullscreen_content_controls. protected…
Jürgen K.
  • 2,889
  • 4
  • 24
  • 52
3
votes
1 answer

Cannot find symbol for method format(DateTimeFormatter)?

I'm having a problem and I absolutely can't wrap my head around it. I am inexperienced in Java (or any language, for that matter), so excuse me if this is a stupid question. From what I can tell, the format() method from…
ajent
  • 81
  • 7
3
votes
0 answers

IntelliJ MANIFEST.MF cannot resolve main class

I'm attempting to create a jar for an RSA-based encryption program that I'm working on. The program itself is completely functional, and runs perfectly by running my main class, aptly named Main. However, when I attempt to use IntelliJ artifacts to…
Elie Hess
  • 41
  • 4
3
votes
1 answer

how to construct a Rect object in opencv 3 in python?

I tried to create it by writing the command: myRect = cv2.Rect(p1, p2) but it does not find it. It writes: Cannot find reference 'Rect' in 'imported module cv2'. thanks for helping! to make it clearer: I don't want to draw a rectangle on an…
Amit Keinan
  • 149
  • 8
3
votes
2 answers

Maven throws compilation error, "Cannot find symbol" on @XmlAccessorType, but I can find it

Why is my mvn clean install command telling me that it Cannot find Symbol, when the class that it complains about seems to clearly be available? I am building a library that handles calls to a REST api (HP ALM). It returns xml, and so I have to…
jumps4fun
  • 3,635
  • 9
  • 45
  • 84
2
votes
0 answers

Cannot resolve symbol 'default_web_client_id' Error , But App Runs Successfully

I have Tried deleting and re-importing the new google-service.json file. As you can see that there's no error in Build and Logcat , and neither any issue in App after build. But Red Line is showing under default_web_client_id as Cannot resolve…
2
votes
2 answers

To call inherited final method produce "cannot find symbol" error

I have this code: import javafx.scene.control.TextArea; import javafx.event.EventHandler; import javafx.scene.input.KeyEvent; import javafx.scene.input.KeyCode; import javafx.scene.Node; public class InitialTextFixedArea extends TextArea{ …
2
votes
1 answer

Package in dl4j does not exist

I'm trying to start the dl4j examples in IntelliJ using the 1.8 Java 64x JDK. I've followed the instructions exactly like in description Now the last step doesn't work. While starting i get hundreds of exception like: Error:(3,35) java:package…
Jürgen K.
  • 2,889
  • 4
  • 24
  • 52
1
2 3
14 15