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

java: cannot find symbol symbol: method getRoles()

My Role Class. I have getter setter annotations: @Getter @Setter @Builder @Entity @Table(name = "role_table") @NoArgsConstructor @AllArgsConstructor public class Role { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name…
program
  • 9
  • 2
0
votes
0 answers

How do I recreate the Array List built in method Offer() to add a string to an existing Array List?

I am trying to recreate the built in method Offer() myself to use to add items(Strings) to an existing Array List. Here is my code already: import java.util.ArrayList; public class PriorityQueue { ArrayList queue; public…
0
votes
1 answer

Conditional Gradle dependencies based on function result

How can i import Linphone library only when built in Sip Api is not supported? Because this library greatly affects to apk size (~100 Mb) This is example of conditional dependency (based on variable in gradle.properties) in my :app Gradle file: if…
0
votes
0 answers

cannot find symbol for "nl.altindag.ssl.SSLFactory;"

I have looked at all the similar questions regarding "cannot find symbol". Most of them give a vague answers in terms of "It means that either there is a problem in your Java source code, or there is a problem in the way that you are compiling…
0
votes
1 answer

fully qualified name vs import statement

case 1. class A extends java.util.ArrayList { public static void main(String[] args) { ArrayList a=new ArrayList(); } } Here I am getting a compiletime error saying, cannot find symbol Symbol:class ArrayList …
0
votes
0 answers

* What went wrong: Gradle could not start your build

What went wrong: Gradle could not start your build. *- Cannot create service of type TaskExecuter using method ProjectExecutionServices.createTaskExecuter() as there is a problem with parameter #17 of type…
0
votes
0 answers

Cannot find symbol class MessageRVAdapter

I do have a MessageRVAdapter in my project directory but I don't know why my app isn't finding this class. I get the following problem in MainActivity.java within app\src\main\java\com\example\chatbot: cannot find symbol private MessageRVAdapter…
0
votes
2 answers

This constantly results in "Error Cannot Find Symbol" in the terminal. Would very much appreciate if someone could tell me how to fix it

So, this is the sample code that we are supposed to use as reference for a formative assessment. I decided to run it in the terminal to see if it would work, and it always result in "Error Cannot Find Symbol". Would appreciate if someone could tell…
Confusion
  • 1
  • 1
0
votes
0 answers

Is there a solution to this cannot find symbol error

I am having trouble figuring how to solve this "cannot find symbol" error. The error is occurring in the line with if (serverNamePart1.length >= 3) { and it saying that serverNamePart1 is the issue. public static String getServerName() { …
0
votes
0 answers

Why am I getting a cannot find symbol error in my factory class

I'm trying to create a factory that contains chart types but I'm getting a cannot find symbol error on my this.map.put(chart.nc); under nc and I have no idea why, can anyone tell me what I'm doing wrong? private enum ChartType { BAR, PIE, LINE,…
J52677
  • 11
0
votes
1 answer

I can't seem to find the reason why its "error: cannot find symbol"

[Disclaimer: Beginner in Java] My program has run into a problem just now, while I was trying to finish it up. The error was that it cannot find the symbol, and the IDE (I am using Text Pad) pinpoints it inside the main method, check…
0
votes
1 answer

Survicate React-Native error: cannot find symbol Survicate.Survicate.setWorkspaceKey(workspaceKey);

After following the instruction on the document: https://github.com/Survicate/react-native-survicate I got build failed on Android: error: cannot find symbol Survicate.Survicate.setWorkspaceKey(workspaceKey); ^ symbol: variable…
Huan Huynh
  • 399
  • 6
  • 16
0
votes
1 answer

Cannot find symbol in toString

Problem I am trying to create a simple Suitcase class that wraps some Items which have a weight. I created a getTotalWeight() method and now I want to call it in my toString method but I get: cannot find symbol on my statement…
sqpl13
  • 15
  • 2
0
votes
1 answer

Symbol from shared library not found, though defined

I'm working on C++ code called, via pybind11, from a Python (v3.8) application on Ubuntu 20.04. Running the application I get an error Traceback (most recent call last): snip... ImportError: /.so: undefined symbol:
Uri Raz
  • 435
  • 1
  • 3
  • 15
0
votes
2 answers

Java Netbeans Cannot Find Symbol

I am working through a practice assignment in my Java Programming Textbook and have encountered the common "error: cannot find symbol". I have to create an application that refers to another class in the same directory, but the compiler fails to…
Waxyshaw
  • 3
  • 5