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
535
votes
18 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
  • 698,415
  • 94
  • 811
  • 1,216
37
votes
24 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,151
  • 10
  • 57
  • 117
20
votes
2 answers

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
  • 4,197
  • 14
  • 61
  • 131
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
  • 398
  • 1
  • 6
  • 21
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
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
  • 178
  • 3
  • 11
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
  • 988
  • 2
  • 14
  • 45
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.
  • 3,427
  • 9
  • 30
  • 66
4
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,994
  • 10
  • 50
  • 96
3
votes
0 answers

Cannot use resources in AAR pack in Android Library module:cannot resolve symbol

the project structure is: project --app --library_module1 --library_module2 and i need to use AAR files in library_module1. i put aars in library_module2 and added them using artifacts.add() in build.gradle, then using them in library_module1 the…
Draculea
  • 303
  • 2
  • 7
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
  • 91
  • 1
  • 9
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
  • 63
  • 7
3
votes
1 answer

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

"Cannot find method window()" in IntelliJ (Java)

So I'm learning Selenium for test automation with Java, and I have an error message like in the title, "window()" in IntelliJ is red . I was trying to import org.openqa.selenium.WebDriver.Options, but its grayed out, so useless. import…
Weronika
  • 29
  • 5
1
2 3
16 17