Sphero TwoPhonesOneBall sample compiler error - java

I imported the samples of Sphero-Android SDK to my workspace. TwoPhonesOneBall project gives compiler errors. In ConnectionActivity.java class, the following imports cannot be resolved.
//...some imports
import orbotix.multiplayer.LocalMultiplayerClient;
import orbotix.multiplayer.MultiplayerControlStrategy;
import orbotix.multiplayer.MultiplayerGame;
import orbotix.multiplayer.RemotePlayer;
//...imports
How can I fix it? Since these classes don't exist, I didn't come up with a solution. I searched the net but I couldn't find similar problem. By the way,the same problem also occurs in MultiplayerLobby application.

Related

Getting the import net cannot be resolved error in eclipse plant uml

I have installed PlantUML and added the classpath to it. However, the following import keeps giving me an error in eclipse.
import net.sourceforge.plantuml.SourceFileReader;
It says The import net cannot be resolved
What could be the possible solution to this?

Importing class in the same package

I went through some of topics, but didn't find a proper anser. I'm trying to import class to other class, but I get "The import "classname" cannot be resolved" error. Both classes are in the same package. What can cause the problem? I also tried to clean my project.
If both classes are in same package, you don't have to import it.

Android Studio "cannot resolve symbol HttpRequest" when import HttpRequest.HttpRequest

I have created a new Java class and wanted to import it in MainActivity. I tried:
import HttpRequest.HttpRequest
And I got:
cannot resolve symbol HttpRequest
What am I doing wrong?
Project structure:
HttpRequest.HttpRequest doesn't exist.
You are importing the wrong class.
It should be:
import com.example.megido.myapplication.HttpRequest;
Also check this link for more info about Android Studio Tips and Tricks.
For quick fixes to coding errors, the IntelliJ powered IDE implements the Alt + Enter key binding to fix errors (missing imports, variable assignments, missing references, etc).
If you want import another Class in Present class then you have to give its full path ie. import com.example.megido.myapplication.HttpRequest
If you trying to import HttpRequest for network request then you have to add the corresponding library to you project.
I hope it helps..

java.lang.NoClassDefFoundError: android.support,v4.app.Notification

Following a reboot my Eclipse Android project was damaged, with the vast majority of my import statements being removed. I've managed to recover it using the "Source...Organize Imports" option, but now I get the above error in a previously-working piece of code which uses NotificationCompat.
I found and followed the advice from this question:
Could not find class 'android.app.Notification$Builder
I have import android.support.v4.app.NotificationCompat; at the top of my class, and have both android-support-v4.jar and android-support-v7-appcompat.jar in the lib folder of my project. I still get the error above however.
What else can I try to resolve this?

JavaFX Import Error for javafx.builders package

I am learning JavaFX from Pro Java FX 2 book. I am trying to import javafx.builders.* package. but compiler keeps raising errors import cannot be resolved. but other packages javafx.* excepts javafx.builders.* imports successfully. I am using JavaSDK 7u51. I tried in eclipse with e(fx)clipse and Netbeans as well. Please help me to find solution.
There is no such package as javafx.builders. Each builder is (generally) in the package of the class it builds, for instance GroupBuilder is in javafx.scene, as:
import javafx.scene.GroupBuilder;

Categories