数据无法上传到Firestore,并且无法在Logcat上“无法加载memtrack模块”

时间:2019-05-23 09:12:55

标签: java android firebase google-cloud-firestore

我正在尝试使用Android Studio将一些数据上传到Firestore,但是数据无法更新到Firestore

orderAddBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String productName = orderName.getText().toString();

                Map<String, String> productMap = new HashMap<>();

                productMap.put("name", productName);

                mFirestore.collection("Product").add(productMap).addOnSuccessListener(
                        new OnSuccessListener<DocumentReference>() {
                            @Override
                            public void onSuccess(DocumentReference documentReference) {
                                Toast.makeText(Info.this, "Order Added", Toast.LENGTH_SHORT).show();
                            }
                        }
                ).addOnFailureListener(new OnFailureListener() {
                    @Override
                    public void onFailure(@NonNull Exception e) {

                        String error = e.getMessage();

                        Toast.makeText(Info.this, "Error: " + error, Toast.LENGTH_SHORT).show();
                    }
                });
            }
        });

这是我的logcat错误

E/memtrack: Couldn't load memtrack module
E/GmsContextObserver: Received context data while not listening
E/storaged: getDiskStats failed with result NOT_SUPPORTED and size 0
E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
E/netmgr: WifiForwarder unable to open QEMU pipe: Invalid argument

0 个答案:

没有答案