我有一个数字计数器程序。我为Plus,Minus和Clear定义了3个按钮。 当我使用清除按钮清除TextView时它很好。但在使用Plus和Minus之后它就是Continuation last counter。那是我的代码。 请帮助我。
public class CounterActivity extends Activity {
private Button btnPlus;
private Button btnMinus;
private Button btnClear;
private TextView txtCounter;
int counter = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.counter_menu);
btnPlus = (Button) findViewById(R.id.btnPlus);
btnMinus = (Button) findViewById(R.id.btnMinus);
btnClear = (Button) findViewById(R.id.btnClear);
txtCounter = (TextView) findViewById(R.id.txtCounter);
btnPlus.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
counter++;
txtCounter.setText(counter + "");
}
});
btnMinus.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
counter--;
txtCounter.setText(counter + "");
}
});
btnClear.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
txtCounter.setText(0 + "");
}
});
}
}
答案 0 :(得分:1)
按如下方式更改您的清除按钮curl: (51) SSL: certificate verification failed (result: 5)
Error: Failed to download resource "chromedriver"
Download failed: https://chromedriver.storage.googleapis.com/2.22/chromedriver_mac32.zip
方法:
export SSL_CERT_FILE=""
brew install something