Description Resource Path Location Type
ACTIVE cannot be resolved to a variable ClientService.java /agent/src/com/mwr/dz/services line 42 Java Problem
我找到了该文件(即:ClientService.java),发现第42行如下:
package com.mwr.dz.services;
import java.util.Locale;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.Message;
import android.os.RemoteException;
import android.util.Log;
import android.util.SparseArray;
import android.widget.Toast;
import com.mwr.dz.Agent;
import com.mwr.dz.R;
import com.mwr.dz.models.EndpointManager;
import com.mwr.jdiesel.api.connectors.Endpoint;
import com.mwr.jdiesel.api.links.Client;
public class ClientService extends ConnectorService {
public static final int MSG_GET_DETAILED_ENDPOINT_STATUS = 11;
public static final int MSG_GET_ENDPOINTS_STATUS = 12;
public static final int MSG_GET_SSL_FINGERPRINT = 13;
public static final int MSG_START_ENDPOINT = 14;
public static final int MSG_STOP_ENDPOINT = 15;
private SparseArray<Client> clients = new SparseArray<Client>();
private final EndpointManager endpoint_manager = new EndpointManager(this);
public Bundle getEndpointDetailedStatus(int endpoint_id) {
Bundle data = new Bundle();
Endpoint endpoint = this.endpoint_manager.get(endpoint_id);
data.putInt(Endpoint.ENDPOINT_ID, endpoint.getId());
data.putBoolean(Endpoint.CONNECTOR_ENABLED, endpoint.isEnabled());
data.putBoolean(Endpoint.ENDPOINT_PASSWORD, endpoint.hasPassword());
data.putBoolean(Endpoint.ENDPOINT_SSL, endpoint.isSSL());
switch(endpoint.getStatus()) {
第42行: case ACTIVE:
data.putBoolean(Endpoint.CONNECTOR_CONNECTED, true);
data.putBoolean(Endpoint.CONNECTOR_OPEN_SESSIONS, true);
break;
............
............
也就是 字符 ACTIVE 在别的地方定义了,但eclipse没有找到定义它的文件。我估计是环境设置的问题,但对eclipse不太熟,想请教一下,该如何设置?