로그문제
1. 북마크 텝 만들기 1 (8분 10초 쯤 ..) 2.package com.example.mysolelife.fragments import android.os.Bundleimport android.provider.ContactsContractimport android.util.Logimport androidx.fragment.app.Fragmentimport android.view.LayoutInflaterimport android.view.Viewimport android.view.ViewGroupimport androidx.databinding.DataBindingUtilimport androidx.navigation.findNavControllerimport androidx.recyclerview.widget.GridLayoutManagerimport androidx.recyclerview.widget.RecyclerViewimport com.example.mysolelife.Rimport com.example.mysolelife.contentsList.BookmarkRVAdapterimport com.example.mysolelife.contentsList.ContentModelimport com.example.mysolelife.databinding.FragmentBookmarkBindingimport com.example.mysolelife.utils.FBAuthimport com.example.mysolelife.utils.FBRefimport com.google.firebase.database.DataSnapshotimport com.google.firebase.database.DatabaseErrorimport com.google.firebase.database.ValueEventListenerclass BookmarkFragment : Fragment() {private lateinit var binding : FragmentBookmarkBindingprivate val TAG = BookmarkFragment::class.java.simpleName val bookmarkIdList = mutableListOf()val items = ArrayList()val itemKeyList = ArrayList()lateinit var rvAdapter : BookmarkRVAdapteroverride fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)}override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {// Inflate the layout for this fragment binding = DataBindingUtil.inflate(inflater,R.layout.fragment_bookmark,container,false)//1. 전체 카테고리에 있는 컨텐츠 데이터들을 다 가져옴 getCategoryData()//2. 사용자가 북마크 한 정보를 다 가져옴 getBookmarkData()//3. 전체 컨텐츠 중에서, 사용자가 북마크한 정보만 보여줌 rvAdapter = BookmarkRVAdapter(requireContext(),items,itemKeyList,bookmarkIdList)val rv : RecyclerView = binding.bookmarkRV rv.adapter = rvAdapter rv.layoutManager = GridLayoutManager(requireContext(),2)binding.homeTap.setOnClickListener{ //홈텝 클릭시 어떻게 하겠다 ~ it.findNavController().navigate(R.id.action_bookmarkFragment_to_homeFragment)} binding.talkTap.setOnClickListener{ it.findNavController().navigate(R.id.action_bookmarkFragment_to_talkFragment)} binding.tipTap.setOnClickListener{ it.findNavController().navigate(R.id.action_bookmarkFragment_to_tipFragment)} binding.storeTap.setOnClickListener{ it.findNavController().navigate(R.id.action_bookmarkFragment_to_storeFragment)} return binding.root }private fun getCategoryData(){val postListener = object : ValueEventListener { //컨텐츠 아이디 값을 받아오고 있음 firebase에 컨텐츠들을 저장 override fun onDataChange(dataSnapshot: DataSnapshot) {for (DataModel in dataSnapshot.children){Log.d(TAG,DataModel.toString())val item = DataModel.getValue(ContentModel::class.java)items.add(item!!)itemKeyList.add(DataModel.key.toString())}rvAdapter.notifyDataSetChanged()}override fun onCancelled(databaseError: DatabaseError) {// Getting Post failed, log a message Log.w("ContentListActivity", "loadPost:onCancelled", databaseError.toException())}}FBRef.category1.addValueEventListener(postListener)FBRef.category2.addValueEventListener(postListener)}private fun getBookmarkData(){val postListener = object : ValueEventListener { //컨텐츠 아이디 값을 받아오고 있음 firebase에 컨텐츠들을 저장 override fun onDataChange(dataSnapshot: DataSnapshot) {for (DataModel in dataSnapshot.children){Log.e(TAG,DataModel.toString())bookmarkIdList.add(DataModel.key.toString())}}override fun onCancelled(databaseError: DatabaseError) {// Getting Post failed, log a message Log.w("ContentListActivity", "loadPost:onCancelled", databaseError.toException())}}FBRef.bookmarkRef.child(FBAuth.getUid()).addValueEventListener(postListener) //FBRef 에 있는 북마크 Ref 값을 가져옴 }} 3. 에러발생 8분쯤에 나오는 화면처럼 키값이 무엇이고 벨류 값은 무엇이다 라고 나오는걸 볼 수 있는데 제가 실행하면 아래 사진처럼 "북마크 true" 만 뜨네요 .. (사진)