我正在嘗試在我的項目中使用GridLayout
,但理想情況是使用Android支持庫,因此我可以定位較低版本的API。當我將GridLayout
拖入圖形佈局設計器時,會彈出一條消息,詢問是否需要API版本超過14的兼容性庫,並詢問是否要安裝此庫。我打了「安裝」讓Eclipse做它的事,但在Eclipse圖形佈局設計錯誤顯示出來:android.support.v7.widget.GridLayout無法實例化
The following classes could not be instantiated: - android.support.v7.widget.GridLayout See the Error Log (Window > Show View) for more details."
(這裏是screenshot)
從錯誤日誌,android.support.v7.widget.GridLayout
失敗的實例。
確保已將GridLayout庫項目作爲庫添加到項目中。 – GrIsHu
另外,當您將GridLayout庫導入工作區時,請確保將該庫項目也複製到工作區中。 – GrIsHu