如何從onResume()的覆蓋項中調用getIntExtra?非靜態方法getIntExtra(java.lang.String,int)不能從靜態上下文中引用嗎?
@Override
protected void onResume()
{
super.onResume();
setDDL_Selected(0);
setDDL_Selected(Intent.getIntExtra("DDL_ID", 0));
}
編譯器會引發以下錯誤:
的錯誤是如下代碼
Non-static method getIntExtra(java.lang.String, int) cannot be referenced from a static context?
謝謝,還在學習!將接受,當它允許我。感謝您的解釋,現在有道理:-) – Apqu