到的AsyncTask數組列表值I具有的AsyncTask設置我傳遞一個Arraystring這樣獲得通過在doinbackground
ArrayList<String> creds = new ArrayList<String>();
creds.add(string1);
creds.add(string2);
new myasynctask().execute(credentials);
的AsyncTask方法 類myasynctask延伸的AsyncTask,整數,字符串>
DOinbackground
protected String doInBackground(ArrayList<String>... creds)
{ String lol1= creds[0].toString();
String lol2= creds[1].toString();
........rest of the code
}
我得到一個數組i ndex債券異常 如何將兩個值傳入doinbackground方法並同時獲得兩者。
您能區分「creds」和「credentials」嗎? –