我試圖找回從原始文件夾動態代碼的文件,如下沒有得到包名
try{
DataInputStream dataIO= new DataInputStream(getResources().getIdentifier("raw/"+chapter, null ,<what to write>);
String strLine= null;
while((strLine = dataIO.readLine())!=null){
buffer.append(strLine);
buffer.append("\n");
}
dataIO.close();
}catch(Exception e){}
如果我鍵入「寫什麼」部分直接在包的名稱,它顯示錯誤。請給出一些想法。
什麼錯誤?顯示堆棧跟蹤 –
我的意思是語法錯誤。我的軟件包名稱是com.expandableList。如果我在包區域中寫入「com.expandableList」。它顯示紅色下劃線。 – test1990bdvt