我试图在Eclipse中编写的Android Studio link中重写应用程序。有两个问题,第一个问题是项目中有这一行:错误:无法找到符号类AsyncCallWS Android
import com.example.webserviceactivity.R;
我无法在Android Studio上编写这一行。 第二个问题是,在这部分代码:
b = (Button) findViewById(R.id.button1);
//Button Click Listener
b.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
//Check if Celcius text control is not empty
if (et.getText().length() != 0 && et.getText().toString() != "") {
//Get the text control value
celcius = et.getText().toString();
//Create instance for AsyncCallWS
AsyncCallWS task = new AsyncCallWS();
//Call execute
task.execute();
//If text control is empty
} else {
tv.setText("Please enter Celcius");
}
}
});
我有这样的错误:
error: cannot find symbol class AsyncCallWS Android in this part :
AsyncCallWS task = new AsyncCallWS();
我该如何解决这些问题呢?谢谢。
什么是AsyncCallWS?你有进口吗? – calvinfly
检查我的答案。接受它,如果它适合你:) –