我正在尝试通过以下代码在android中使用 org.apache.commons.collections.CollectionUtils
import java.util.ArrayList;
import org.apache.commons.collections.CollectionUtils;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class CheckCommonsActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String email1 = "xyz@gmail.com";
String email2 = "abc@gmail.com";
String email3 = "mnp@gmail.com";
String email4 = null;
ArrayList<String> emailList1 = new ArrayList<String>();
emailList1.add(email4);
emailList1.add(email1);
emailList1.add(email2);
emailList1.add(email3);
ArrayList<String> emailList2 = new ArrayList<String>();
emailList2.add(email3);
emailList2.add(email2);
emailList2.add(email1);
boolean isEqual = CollectionUtils.isEqualCollection(emailList1,
emailList2);
TextView text = (TextView) findViewById(R.id.text);
text.setText(String.valueOf(isEqual));
}
}
我在 Console Conversion to Dalvik format failed with error 1中收到以下错误消息。完整的消息线索在此处上传。