这是我的代码,我该怎么办?
我已经宣布
import com.orbotix.ConvenienceRobot;
在顶部
我的代码出了什么问题,我已完全按照SDK示例
进行操作 import android.Manifest;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import com.orbotix.ConvenienceRobot;
import com.orbotix.DualStackDiscoveryAgent;
import com.orbotix.common.DiscoveryException;
import com.orbotix.common.Robot;
import com.orbotix.common.RobotChangedStateListener;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends Activity implements View.OnClickListener, RobotChangedStateListener {
private static final int REQUEST_CODE_LOCATION_PERMISSION = 42;
private static final float ROBOT_VELOCITY = 0.6f;
private ConvenienceRobot mRobot;
private Button front;
private Button back;
@Override
protected void onCreate( Bundle savedInstanceState ) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
/*
Associate a listener for robot state changes with the DualStackDiscoveryAgent.
DualStackDiscoveryAgent checks for both Bluetooth Classic and Bluetooth LE.
DiscoveryAgentClassic checks only for Bluetooth Classic robots.
DiscoveryAgentLE checks only for Bluetooth LE robots.
*/
}
@Override
public void handleRobotChangedState(Robot robot, RobotChangedStateNotificationType type) {
switch (type) {
case Online: {
//Save the robot as a ConvenienceRobot for additional utility methods
mRobot = new ConvenienceRobot(robot);
break;
}
}
}
mRobot = new ConvenienceRobot(机器人);总是强调 怎么了?