When trying to build code for the Raspberry Pi on our team laptops, we receive a bunch of errors related to imports that cannot be resolved (e.g. .edu, com.google, etc.)*. While we don’t receive these errors on one of our student laptops, we’re admittedly baffled as to the process we went through in the early season to achieve this functionality. Any and all advice is welcome - thank you in advance from 386!
*The team laptops have been and are able to build standard robot code.
The code is the default java-multiCameraServer example from the pi dashboard, the language is java, and the errors consist of ‘import cannot be resolved’; if it would help, I can post a fuller report, but there’s not much beyond that.
I am not a Java expert and I don’t use Java in FRC so I am not familiar with the default java-multiCameraServer example. I may be able to help you if I can see the code but maybe someone who is more familiar with Java can help more.
Where do you get these errors from? Eclipse? Other editor? When packaging the jar through terminal/cmd?
Also, did it ever work in the past for you? (As in, is this a new error when it worked before?)
com.google appears very surprising to me as I don’t think Google really has anything to do with opencv/cscore libraries, could you please provide the exact print out errors?
Could you elaborate on the differences in setup between those two computers? Is the editor/compiler installed in the same way for both of them? Do you have admin privileges on the team laptop (may not be the case for a school laptop)?
b. The rest of the errors in ‘Problems’ follow this format
The import com.google cannot be resolved
The import edu cannot be resolved
The import org.opencv cannot be resolved And all the problems that come from faulty imports, like types
not being resolved
c. This is the error we receive when attempting to build
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project ‘java-multiCameraServer’.
Just a thought, are the computers connected to an internet connection? If so, is there a firewall on the network?—try to open the following link in a web browser and see if it downloads a file. (Since the editor is saying that it is unable to download from that link/resource).
In addition, could you include your code? Either a link to GitHub or a zip/folder with the files would work.
What does this mean in terms of the laptop? Is the user running an Administrator? Is there any school software running/configured on the computer?
You need an internet connection the first time you build the code on a computer so the dependencies can be downloaded and cached. Unlike wpilib there isn’t an offline installer so it’s necessary to do this step with an internet connection.