我得到這個R.array錯誤。它不會顯示在列表中後,我鍵入R.我試圖刪除R.java
但仍然沒有工作R.array在我輸入R後不顯示在列表中
private void openNewGameDialog()
{
new AlertDialog.Builder(this).setTitle("Choose a Category").setItems(R.array.category, new DialogInterface.OnClickListener() //alert dialog which will show list of categories to select
{
public void onClick(DialogInterface dialoginterface, int i)
{
startGame(i);
}
}).show();
}
清理您的項目? – TronicZomB 2013-04-24 15:15:25
確保構建您的項目,以便在您的bin目錄下生成R.java並將其編譯爲R.class。 (您是使用Eclipse還是命令行?) – 2013-04-24 15:20:11
eclipse helios @ Code-Guru – 2013-04-24 15:21:49