Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/388.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 源代码与android studio的字节码不匹配_Java_Android_Debugging_Firebase_Crash - Fatal编程技术网

Java 源代码与android studio的字节码不匹配

Java 源代码与android studio的字节码不匹配,java,android,debugging,firebase,crash,Java,Android,Debugging,Firebase,Crash,下面是我的代码片段。这段代码在我第一次创建listadapter时工作过一次。但在那之后的某个时候它就不起作用了。应用程序在点击列表时不断崩溃。请在下面的代码段中添加 public class ViewRequestActivity extends AppCompatActivity { private ArrayList<HashMap<String, String>> list; DatabaseReference databaseRequests; privat

下面是我的代码片段。这段代码在我第一次创建listadapter时工作过一次。但在那之后的某个时候它就不起作用了。应用程序在点击列表时不断崩溃。请在下面的代码段中添加

public class ViewRequestActivity extends AppCompatActivity {

private ArrayList<HashMap<String, String>> list;

DatabaseReference databaseRequests;
private TextView textViewRequestNo;
private EditText editTextRequestPurpose;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_view_request);        databaseRequests = FirebaseDatabase.getInstance().getReference("Requests");
    Query query = databaseRequests.orderByChild("requestNo").equalTo(11);
    query.addValueEventListener(new ValueEventListener() {
        @Override
        public void onDataChange(DataSnapshot dataSnapshot) {
            for (DataSnapshot messageSnapshot: dataSnapshot.getChildren()) {
                String requestDate = (String) messageSnapshot.child("requestDate").getValue();
                String requestPurpose = (String) messageSnapshot.child("requestPurpose").getValue();
                String requestConPerson = (String) messageSnapshot.child("requestConPerson").getValue();
                String requestSepList = (String) messageSnapshot.child("requestSepList").getValue();
                //populateRequests(requestDate,requestPurpose,requestConPerson,requestSepList);

                HashMap<String,String> temp=new HashMap<String, String>();
                temp.put(FIRST_COLUMN,requestDate);
                temp.put(SECOND_COLUMN,requestPurpose);
                temp.put(THIRD_COLUMN,requestConPerson);
                temp.put(FOURTH_COLUMN,requestSepList);
                list.add(temp);
                ListViewAdapter adapter= new ListViewAdapter(ViewRequestActivity.this,list);
                listView.setAdapter(adapter);
            }
        }
我试过很多次调试,但不确定它是否总是崩溃。?
我希望有人能告诉我我遗漏了什么。

清理项目并禁用instant run,然后再试一次。我已经清理了很多次了。还禁用了instant run。并重新构建项目,但sam.eclean项目并禁用instant run,然后重试。我已经清理了很多次。还禁用了instant run。并重新构建项目,但仍然是sam.e
 final long newIdent = Binder.clearCallingIdentity();
        if (ident != newIdent) {
            Log.wtf(TAG, "Thread identity changed from 0x"
                    + Long.toHexString(ident) + " to 0x"
                    + Long.toHexString(newIdent) + " while dispatching to "
                    + msg.target.getClass().getName() + " "
                    + msg.callback + " what=" + msg.what);
        }

        msg.recycleUnchecked();
    }
}