파이어베이스를 연결한 안드로이드 스튜디오 질문있습니다

조회수 694회

이미지

이거를 따라 하고 있는데 문제가 있습니다ㅠㅠ

데이터베이스를 연결했는데 저 코드를 입력해도 파이어베이스 데이터베이스 화면에 저런 형식(첨부된 이미지 참고)으로 뜨지 않습니다ㅠ ㅠ hello world를 제가 출력해봤는데 그건 잘 되더군요. 제가 따로 데이터베이스에 설정해야 하는 항목들이 있을까요?

제 코드는 하단에 첨부하겠습니다

package com.example.myapplication;

public class Board { String title; String content;

Board(){}

Board(String title, String content){
    this.title=title;
    this.content=content;
}
public String gettitle(){return title;}
public String getContent(){return content;}

}

<EditText
    android:id="@+id/edittext1"
    android:layout_width="304dp"
    android:layout_height="100dp"
    android:layout_weight="1"
    android:ems="10"
    android:inputType="textPersonName"
    android:text="제목" />

<EditText
    android:id="@+id/edittext2"
    android:layout_width="304dp"
    android:layout_height="100dp"
    android:layout_weight="1"
    android:ems="10"
    android:inputType="textPersonName"
    android:text="내용" />

<Button
    android:id="@+id/button1"
    android:layout_width="204dp"
    android:layout_height="100dp"
    android:layout_weight="1"
    android:text="확인" />

<ListView
    android:id="@+id/listview1"
    android:layout_width="match_parent"
    android:layout_height="500dp"
    android:layout_weight="1" />

1 답변

  • Firebase 콘솔에서 해당 프로젝트는 제대로 설정하셨나요?

    제대로 설정하셨다면 Firebase database 안에 데이터들은 제대로 저장이 되었나요?

    • Firebase 콘솔에서 프로젝트 설정하는것이 올바른 연결을 말씀하시는거라면 제대로 설정했습니다ㅠㅠ. hello world라는 문장을 연결했었는데 잘 작동되었거든요... firebase database안으로 데이터가 안 들어가는걸 보면 제 코드에 문제가 있어 데이터가 안 들어가는 것 같은데 이유를 모르겠습니다ㅠㅠ kakkung 2020.3.27 20:34
    • 전체 코드를 모르니 답변을 해드릴수가 없습니다... 주동혁 2020.3.30 10:40

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)