Go to Post I could say that the decline in the population of pirates is responsible for global warming, the statistics correlate, but its obvious there's no causation there. - Racer26 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2015, 19:49
antonyebert antonyebert is offline
Registered User
FRC #4993
 
Join Date: Jan 2015
Location: NCA - Hutchinson, MN
Posts: 9
antonyebert is an unknown quantity at this point
Exclamation Import Cannot Be Resolved

Alright, so, I'm a really new programmer. And when I say really new, I mean I started 3 weeks ago, and all of my learning has been from youtube. So if any answers could be in layman terms, it would be much appreciated!

So, to start programming our robot, I created the program outline in RobotBuilder, then exported that to Eclipse. When I open the program in Eclipse however, it tells me that it cannot import most of the services it needs to run.

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboar d;
import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.buttons.*;

These are an example of some of the things it won't import. The exact message is "import edu cannot be resolved". I have tried uninstalling eclipse, reinstalling it, and running a new program on it before trying to use RobotBuilder. I have checked the JARs, and they aren't corrupt.

Without these services, I cannot create pretty much any of the variables and objects I need (like Joysticks, solenoids, or speed controllers). Any ideas?
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2015, 19:52
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Import Cannot Be Resolved

You have the FRC Eclipse plugins installed, right?
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2015, 20:26
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Import Cannot Be Resolved

When you create a robot project in eclipse, it sets up certain settings that don't get done if you merely import a project from Robot Builder. Create a dummy robot project in eclipse and then see if the issues go away.
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2015, 19:36
antonyebert antonyebert is offline
Registered User
FRC #4993
 
Join Date: Jan 2015
Location: NCA - Hutchinson, MN
Posts: 9
antonyebert is an unknown quantity at this point
Re: Import Cannot Be Resolved

Thank you Joe Ross! I tried your suggestion, and it worked perfectly! Good thing too, I was getting close to just wiping the computer and starting from scratch. I really appreciate the help!
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2015, 19:48
cstelter cstelter is offline
Programming Mentor
AKA: Craig Stelter
FRC #3018 (Nordic Storm)
Team Role: Mentor
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Mankato, MN
Posts: 77
cstelter will become famous soon enough
Re: Import Cannot Be Resolved

Quote:
Originally Posted by antonyebert View Post
Thank you Joe Ross! I tried your suggestion, and it worked perfectly! Good thing too, I was getting close to just wiping the computer and starting from scratch. I really appreciate the help!
We had the same symptom on our first two eclipse installations (two laptops at our shop). I followed the screensteps at home on my on box and saw the same symptom, but found as Joe indicates I also noticed that once I opened an example project, all was well with other RobotBuilder projects as well.

But back at the shop, our original eclipse installations did not recover the same way-- even the examples were missing the wpilib. The only difference was that when we downloaded at the shop we downloaded Eclipse/Java not Eclipse/C++ (a student was on the page and asked me which one we should use-- since I was not following along with them I told them we needed Java).

Anyway, I realized the potential issue when I set up my own box, so we switched to the C++ version at the shop too as we should have originally been instructed by screeensteps and then it behaved as Joe described.

Just wanted to mention this in case someone ends up on this thread and they made the same mistake or team had made. Pretty late in the season though to be arriving here. Still, maybe this will be useful.
Reply With Quote
  #6   Spotlight this post!  
Unread 09-02-2015, 19:19
antonyebert antonyebert is offline
Registered User
FRC #4993
 
Join Date: Jan 2015
Location: NCA - Hutchinson, MN
Posts: 9
antonyebert is an unknown quantity at this point
Re: Import Cannot Be Resolved

Yes, I do have the pluggins installed. I followed the instructions on FRC on how to download Java and Eclipse.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:45.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi