问题
嗨,我想从Android应用中的Firestore中读取数据。但是,每当我创建引用时,都会发生以下错误:
Internal error in Firestore (0.6.6-dev).
//...
java.lang.IllegalArgumentException: Invalid field path (``). Paths must not be empty, begin with '.', end with '.', or contain '..'
代码
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_hub);
FirebaseFirestore.getInstance(); // this does not result in the error
FirebaseFirestore.getInstance().collection("a"); // this does result in the error
}
预期行为
从指定的fieldPath接收collectionReference。
实际行为
FieldPath为空,导致内部firestore错误。
问题