我已检入以下网址的代码
https://github.com/spring-projects/spring-integration-samples
现在我尝试构建代码并发出命令'gradlew eclipse'
我得到了522错误代码。你能帮我们解决错误
吗?答案 0 :(得分:2)
private delegate void LogDelegate(ListBox messageBox, string data);
private LogDelegate _logDelegate;
private void Log(ListBox messageBox, string data)
{
if (messageBox.InvokeRequired)
{
LogDelegate logDelegate = Log;
Invoke(logDelegate, messageBox, data);
}
else
{
messageBox.Items.Add(data);
}
}
public Form1()
{
InitializeComponent();
//don't forget, initialize the delegate
_logDelegate = Log;
}
private void btn_Start_Click(object sender, EventArgs e)
{
Log("Anything to log");
}
private void MessageCallBack(IAsyncResult aResult)
{
try
{
//Instead of Invoke use
//Invoke(new Action(() => messageBox.Items.Add(usersName.Text + ": " + receivedMessage)));
Log("Anything to log");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
任务在根项目中不可用,因为eclipse插件未应用于该项目。添加
eclipse
靠近build.gradle的顶部,然后重试。
答案 1 :(得分:1)
如果你在Mac上你的问题是你需要做./gradlew eclipse,但如果你在电脑上,也许你需要在某个文件夹中执行gradlew命令。