<identifier>期望</identifier>

时间:2012-02-08 19:14:16

标签: android

我用android做了第一步。但我得到这个错误:标识符在“puplic void try(View view)”预期。错误在哪里?

   import android.app.Activity;
   import android.os.Bundle;
   import android.view.View;
   import android.widget.EditText;

   public class MainActivity extends Activity
   {
       /** Called when the activity is first created. */
       @Override
       public void onCreate(Bundle savedInstanceState)
       {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
       }

       puplic void try(View view) 
       {
           String wert;
           EditText F1 = (EditText)findViewById(R.id.b1);
           wert = F1.getText().toString();
       }
   }

1 个答案:

答案 0 :(得分:2)

尝试java中的保留字,使用别的东西

 public void try2(View view)