小编Noe*_*ndi的帖子

尝试在firebase上填充listview时没有setter/field

我正在尝试从firebase检索数据并使用firebase-ui将其显示在listview上.代码运行正常,但列表视图中没有显示任何内容.这是我从日志中得到的:

W/ClassMapper:在类com.example.sammie.coreteccontacts.Sacco上找不到-KNRXdDOlA9nV6qxXvOl的setter/field

这是我的FirebaselistAdapter

DatabaseReference mDatabaseReference = FirebaseDatabase.getInstance().getReference();
FirebaseListAdapter<Sacco> adapter = new FirebaseListAdapter<Sacco>(getActivity(), Sacco.class, android.R.layout.simple_list_item_1, mDatabaseReference) {
 @Override
protected void populateView(View view, Sacco sacco, int i) {
((TextView)view.findViewById(android.R.id.text1)).setText(Sacco.getName());
}
};
contactList.setAdapter(adapter);
Run Code Online (Sandbox Code Playgroud)

这是我的Sacco课程:

package com.example.sammie.coreteccontacts;

public class Sacco {

    String description;
    String location;
    static String name;

    public Sacco() {
    }

    public Sacco(String description, String location, String name) {
        this.name = name;
        this.description = description;
        this.location = location;
    }

    public static String getName() {
        return name;
    }

    public String getDescription() {
        return description; …
Run Code Online (Sandbox Code Playgroud)

android listview firebase firebase-realtime-database firebaseui

5
推荐指数
1
解决办法
6049
查看次数

node_modules is not recognized as an internal or external command

I'm trying write a test automation script using appium, jasmine and perfecto mobile. Im using the project cloned from the following url with my own configuration Appium Javascript Example

Problem is when I execute the npm test command I get the following error

node_modules is not recognized as an internal or external command

This is how the packages.json script looks like:

  {
  "name": "perfecto_appium_sample",
  "version": "1.0.0",
  "description": "The following sample shows how to Install an application and use WebDriverIO to …
Run Code Online (Sandbox Code Playgroud)

javascript automated-tests node.js appium

2
推荐指数
1
解决办法
3794
查看次数