0
mDriver = (Button) findViewById(R.id.driver);
mCustomer = (Button) findViewById(R.id.customer);
誰能幫我...我得到不能解析符號「司機」和不能解析符號「客戶」的上方。我如何解決這個問題?mDriver =(Button)findViewById(R.id.driver);
mDriver = (Button) findViewById(R.id.driver);
mCustomer = (Button) findViewById(R.id.customer);
誰能幫我...我得到不能解析符號「司機」和不能解析符號「客戶」的上方。我如何解決這個問題?mDriver =(Button)findViewById(R.id.driver);
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="I'm a Driver"
android:id="@+id/Driver" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="I'm a Customer"
android:id="@+id/Customer" />
在佈局文件中的ID是:Driver
& Customer
但在你的代碼,你已經給driver
& customer
。
檢查下面的代碼:
mDriver = (Button) findViewById(R.id.Driver);
mCustomer = (Button) findViewById(R.id.Customer);
謝謝......這工作 –
安置自己的佈局代碼, –
林completaly新本...這裏是佈局代碼? –
在你的res/layout文件夾中。 –