首页
社区
课程
招聘
[原创]eclipse编译的问题
发表于: 2016-11-25 12:18 3191

[原创]eclipse编译的问题

2016-11-25 12:18
3191
我安装了eclipse,adt插件,我想将4个import的项目编译export 出一个项目,即,import:
1)drozer-agent
2)jdiesel
3)mwr-tls
4)mwr-android

export:
1)drozer-agent(新的)

步骤:
1、新建一个目录:tools
2、将 drozer-agent,jdiesel, mwr-tls, mwr-android 这4个目录都copy到 tools 目录下
3、打开 eclipse,分4次import,逐次上面4个项目import
4、在 eclipse 中按下“Run” 按键(结果报错)

报错如下:
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不太熟,想请教一下,该如何设置?

此外,附上编译出错的图,如下:

[培训]科锐逆向工程师培训第53期2025年7月8日开班!

上传的附件:
  • 1.png (215.65kb,5次下载)
收藏
免费 0
支持
分享
最新回复 (3)
雪    币: 43
活跃值: (388)
能力值: ( LV9,RANK:140 )
在线值:
发帖
回帖
粉丝
2
eclipse的源码就是一堆绞在一起的乱麻,恶心程度和x11有得一拼。
2016-11-25 12:43
0
雪    币: 1515
活跃值: (5982)
能力值: ( LV13,RANK:240 )
在线值:
发帖
回帖
粉丝
3
不要直接copy.用eclipse的import功能试试?
会自动将文件拷到workspace中。剩下的应该可以在配置选项卡里面配置
2016-11-25 13:18
0
雪    币: 74
活跃值: (25)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
??我是import的(参考第3点)......

此外,你说的“选项卡”是指哪个选项卡?要配置些什么?
2016-11-25 15:09
0
游客
登录 | 注册 方可回帖
返回