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

Deploying Azure VM in Avilability Zone with Java SDK not working

I have been trying to deploy an Azure VM to an availability zone like the following link https://azure.microsoft.com/en-us/blog/java-manage-availability-zones-and-more/, but I keep on getting the following error. cannot find symbol symbol: method…
Tech333
  • 41
  • 3
0
votes
1 answer

Cannot resolve symbol 'Gamepanel'

i had this problem with this code and it got the error "Cannot resolve symbol 'Gamepanel'" import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; public class GameFrame extends JFrame{ GameFrame(){ …
0
votes
0 answers

react-native-config: cannot find symbol

I've got a fresh React Native app, where I'm trying to use react-native-config: npx react-native init RNConfigDemo cd RNConfigDemo yarn add react-native-config echo "SOME_VAR="something"" > .env I tried to add a line in my…
Nick Bull
  • 9,518
  • 6
  • 36
  • 58
0
votes
1 answer

using getContentpane with FlowLayout to apply changes on Layout, but it does not work why?

Hi there I'm was trying to make 3 buttons(left, center, right) with actionListener, so when someone clicks on one of these buttons the alignment of FlowLayout of the frame change, but when I'm was trying to use getContentpane() method it's was not…
0
votes
2 answers

cannot find symbol - symbol class date - Location package java.util

I can not find my error. The program says that can not fin class Date. Please help me to find the error. It is a inheritance and Polymorphism class. I have classes: GeometricObject, Circle, and Rectangle classes. In GeometricObject class I have a…
0
votes
2 answers

AccountTest.java:10: error: cannot find symbol

I'm currently learning java and i was trying out an example from my textbook but i can't get it to work. I keep getting the "cannot find symbol" error. This is the code in class Account: package account; public class Account { private String…
0
votes
2 answers

Receiving Cannot find symbol error, even though everything is declared within the scope

Preface: Sorry if this question has an easy fix, I am fairly new to learning java. I am trying to compile this block of code, but keep receiving an error stating "Cannot find Symbol" for my for statement, pointing towards 'imp.length(). public…
ter123
  • 21
  • 7
0
votes
1 answer

Cannot find symbol `ResolvingDataSource` from com.google.android.exoplayer2.upstream.ResolvingDataSource

Title says it all. ExoPlayer should have this. Just look at this page: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/upstream/ResolvingDataSource.html But when I import import…
Adam Paul
  • 35
  • 1
  • 9
0
votes
1 answer

Cannot find symbol when I've defined it already

I'm making a Guess the Number game, and this is my code for the game. import java.util.Random; import java.util.Scanner; public class Guess { public static void main(String[] args) { int guess, diff; Random random = new…
RadicalRhino
  • 95
  • 3
  • 10
0
votes
1 answer

including a java class in another class (extends) error

I've written two files (Node.java and priorityQueue.java) that are in the same directory, and I'm trying to use Node inside priorityQueue by using "extends". However, I'm getting "error: cannot find symbol" wherever "Node" appears in my…
Otherness
  • 385
  • 2
  • 16
0
votes
3 answers

error: cannot find symbol and how to create and add objects to an arraylist

I'm attempting to create objects of my Profile class and store them in an arrayList created in a ProfileCollector class I created. import java.util.ArrayList; public class ProfileCollector { private ArrayList profileList; public…
jwong
  • 1
  • 2
0
votes
0 answers

Cannot find symbol Error when creating a new object. Does not error in eclipse, only in terminal on Mac OS

I get errors on all my objects I create with all the If-Statements. The spelling is all the same as well as the capitalization is also the same. The error I am getting from my Mac is so: symbol: class Deadlift location: class…
0
votes
1 answer

setOnCheckedChangeListener cannot resolve symbol in Check Box

I'm trying to make a button that is disabled until you check the checkbox Button mButton=(Button)findViewById( R.id.registerBut); CheckBox mCheckBox= findViewById( R.id.checkBox); mCheckBox.setOnCheckedChangeListener(new…
Vedo
  • 976
  • 4
  • 21
0
votes
1 answer

Why in Maven Error 'java: cannot find symbol'?

I am using Intellij Idea to build a java maven project from a MAC OS machine. When I am trying to run 'compile' an error is issued: Error:(120,41) java: cannot find symbol A line with this error (it works correctly): for (Field field :…
NeverSleeps
  • 1,439
  • 1
  • 11
  • 39
0
votes
5 answers

Employee Class: cannot resolve symbol in EmployeeMain

I have to write an Employee Class, and then call it in Main to run the test items. I keep getting "cannot resolve symbol" on a method, empRate. It exists in the Employee20 Class, but when I call the class and method from EmployeeMain20, I get a…