为什么我为按钮添加监听事件会出错 安卓编程
importjava.io.BufferedReader;importjava.io.IOException;importjava.io.InputStreamReade...
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View.OnClickListener;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends Activity {
Button b=(Button)findViewById(R.id.button1);
b.setOnClickListener(new OnClickListener(){
public void onClick(View v){
}
});
}
............................b.setOnClickListener这个地方出错 展开
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View.OnClickListener;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends Activity {
Button b=(Button)findViewById(R.id.button1);
b.setOnClickListener(new OnClickListener(){
public void onClick(View v){
}
});
}
............................b.setOnClickListener这个地方出错 展开
1个回答
2015-07-29
展开全部
val accumulatedParams = sc.accumulator(Nd4j.zeros(networkParams.shape()))(INDArrayAccumulatorParam)
def zero(initialValue: INDArray): INDArray = Nd4j.zeros(initialValue.shape())
def zero(initialValue: INDArray): INDArray = Nd4j.zeros(initialValue.shape())
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询