inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

173만명의 커뮤니티!! 함께 토론해봐요.

3강 12:11 부분에서 test device를 실행하려는데

미해결

[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)

사진의 우측 하단처럼 자꾸 no running emulators 이렇게 뜨는데 혹시 해결 방법을 말씀해 주실 수 있으세요? 감사합니다.

  • firebase
  • kotlin
  • android
댓글 1 좋아요 0 조회수 448

게시글 삭제하는부분에서 질문이 있습니다.

미해결

[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)

게시글을 삭제한거를 다 보고 데이터베이스를 확인하니 realtime데이터베이스에서는 삭제가 됐지만 이미지는 삭제가 안되었는데 혹시 강의 다음내용에서 나오는지 궁금하네요~!

  • firebase
  • android
  • kotlin
dodejqn6 댓글 1 좋아요 0 조회수 430

오늘 구매햇구요 토씨 하나 안틀리고 클라이언트 환경세팅 9:02까지왔습니다 에러로 안됩니다/

해결됨

풀스택 리액트 라이브코딩 - 간단한 쇼핑몰 만들기

[plugin:vite:react-babel] D:\react_01\shopping-mall\src\routes.tsx: Unterminated string constant. (14:14) 17 | } D:/react_01/shopping-mall/src/routes.tsx:14:14 12 | element: <GlobalLayout />, 13 | children: [ 14 | { path: 'D:\', element: <DynamicIndex />, index: true}, | ^ 15 | { path: 'D:\products\:id', element: <DynamicId />, }, 16 | ] at instantiate (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:67:32) at constructor (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:364:12) at TypeScriptParserMixin.raise (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:3365:19) at Object.unterminated (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:2333:20) at readStringContents (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:2065:16) at TypeScriptParserMixin.readString (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:3244:9) at TypeScriptParserMixin.getTokenFromCode (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:2964:14) at TypeScriptParserMixin.getTokenFromCode (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:7267:18) at TypeScriptParserMixin.getTokenFromCode (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:9752:18) at TypeScriptParserMixin.nextToken (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:2451:10) at TypeScriptParserMixin.next (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:2366:10) at TypeScriptParserMixin.eat (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:2371:12) at TypeScriptParserMixin.parseObjectProperty (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:12126:14) at TypeScriptParserMixin.parseObjPropValue (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:12154:100) at TypeScriptParserMixin.parseObjPropValue (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:9482:18) at TypeScriptParserMixin.parsePropertyDefinition (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:12083:17) at TypeScriptParserMixin.parseObjectLike (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:11993:21) at TypeScriptParserMixin.parseExprAtom (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:11464:23) at TypeScriptParserMixin.parseExprAtom (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:7239:20) at TypeScriptParserMixin.parseExprSubscripts (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:11171:23) at TypeScriptParserMixin.parseUpdate (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:11153:21) at TypeScriptParserMixin.parseMaybeUnary (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:11127:23) at TypeScriptParserMixin.parseMaybeUnary (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:9590:20) at TypeScriptParserMixin.parseMaybeUnaryOrPrivate (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10956:61) at TypeScriptParserMixin.parseExprOps (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10962:23) at TypeScriptParserMixin.parseMaybeConditional (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10937:23) at TypeScriptParserMixin.parseMaybeAssign (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10895:21) at TypeScriptParserMixin.parseMaybeAssign (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:9529:20) at D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10863:39 at TypeScriptParserMixin.allowInAnd (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:12640:12) at TypeScriptParserMixin.parseMaybeAssignAllowIn (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10863:17) at TypeScriptParserMixin.parseExprListItem (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:12380:18) at TypeScriptParserMixin.parseExprList (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:12352:22) at TypeScriptParserMixin.parseArrayLike (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:12240:26) at TypeScriptParserMixin.parseArrayLike (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:8976:24) at TypeScriptParserMixin.parseExprAtom (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:11455:23) at TypeScriptParserMixin.parseExprAtom (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:7239:20) at TypeScriptParserMixin.parseExprSubscripts (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:11171:23) at TypeScriptParserMixin.parseUpdate (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:11153:21) at TypeScriptParserMixin.parseMaybeUnary (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:11127:23) at TypeScriptParserMixin.parseMaybeUnary (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:9590:20) at TypeScriptParserMixin.parseMaybeUnaryOrPrivate (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10956:61) at TypeScriptParserMixin.parseExprOps (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10962:23) at TypeScriptParserMixin.parseMaybeConditional (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10937:23) at TypeScriptParserMixin.parseMaybeAssign (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10895:21) at TypeScriptParserMixin.parseMaybeAssign (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:9529:20) at D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10863:39 at TypeScriptParserMixin.allowInAnd (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:12640:12) at TypeScriptParserMixin.parseMaybeAssignAllowIn (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.js:10863:17) at TypeScriptParserMixin.parseObjectProperty (D:\react_01\shopping-mall\node_modules\@babel\parser\lib\index.j 라고 코드 에러낫구요 이런 상황입니다 1화 앱입니다까지 햇고 그뒤로 product 페이지 만드는데서안되네요 오늘 구매햇구요 토씨 하나 안틀리고 클라이언트 환경세팅 9:02까지왔습니다 에러로 안됩니다/ 반품해도될까요? window 환경입니다 지금강의하신것은 mac 으로하시는것으로보입니다만 제환경에서는 안될것같군요 원활한 해결책을 보고 환불을 결정하겟습니다

  • graphql
  • firebase
  • react
oksky2957 댓글 1 좋아요 1 조회수 962

HAXM is not installed

미해결

[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)

3강을 듣는중에 HAXM 이 설치 되지 않았다고 에러가 나와서 진행이 안되네요 아래와 같은 순서로 진행하였습니다. HAXM 을 설치하려고 하면 이런 에러가 납니다.

  • kotlin
  • android
  • firebase
이수제 댓글 7 좋아요 0 조회수 1687

게시판 기능

미해결

[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)

안녕하세요! 회원가입 로그인 북마크, 스토어 이런 부분 다 빼고 게시판 기능(글 작성, 수정, 삭제, 댓글 달기) 이 부분만 사용하고 싶은 경우는 어떻게 해야 하나요? 다 작성한 부분에서 나머지 부분을 삭제 해야 하나요>?

  • firebase
  • kotlin
  • android
댓글 1 좋아요 0 조회수 424

react-query 에러

해결됨

풀스택 리액트 라이브코딩 - 간단한 쇼핑몰 만들기

3강 학습 중 react-query 버전 문제로 인한 에러가 생겨 질문합니다. 최신 버전으로 설치해서 react-query의 가이드 문서대로 코드를 수정했는데도 계속 에러가 나며 data를 가져오지 못 하고 있습니다. 어떻게 해결해야 할지 모르겠습니다ㅜ 첨부된 사진 외에는 강의대로 코드를 작성했으며 타입스크립트가 아닌 자바스크립트로 진행하고 있습니다.

  • react-query
  • react
  • graphql
  • firebase
김지현 댓글 1 좋아요 0 조회수 1081

uuid 에러

해결됨

풀스택 리액트 라이브코딩 - 간단한 쇼핑몰 만들기

안녕하세요. 수업을 듣던중에 같은 방법으로 uuid 라이브러리를 다운받고 실행을 하고있는데 이런 에러가 발생을 하고 있는데 혹시 어떤 부분이 문제인지 알수있을까요..? @types/uuid 로 삭제 설치 다시 해보고 진행해도 계속 같은 에러가 발생합니다 ㅠ <package.json> "dependencies": { "@types/uuid": "^8.3.4", "graphql-request": "^5.0.0", "graphql-tag": "^2.12.6", "react": "^18.2.0", "react-dom": "^18.2.0", "react-query": "^3.39.2", "react-router-dom": "^6.4.3", "sass": "^1.56.1" }, <handlers.ts> import { v4 as uuid } from "uuid"; const mock_products = Array.from({ length: 20 }).map((_, i) => ({ id: uuid(), imageUrl: `https://placeimg.com/200/150/${i + 1}`, price: 50000, title: `임시상품${i + 1}`, description: `임시상세내용${i + 1}`, createAt: new Date(1668159460287 + i * 1000 * 60 * 60 * 10).toString(), })); <에러 내용> [plugin:vite:import-analysis] Failed to resolve import "uuid" from "src\mocks\handlers.ts". Does the file exist? C:/Users/home/Desktop/배포/shop/shopping/src/mocks/handlers.ts:3:27 1 | import { graphql } from "msw"; 2 | import GET_PRODUCTS from "../graphql/products"; 3 | import { v4 as uuid } from "uuid"; | ^ 4 | const mock_products = Array.from({ length: 20 }).map((_, i) => ({ 5 | id: uuid(), at formatError (file:///C:/Users/home/Desktop/%EB%B0%B0%ED%8F%AC/shop/shopping/node_modules/vite/dist/node/chunks/dep-51c4f80a.js:39971:46) at TransformContext.error (file:///C:/Users/home/Desktop/%EB%B0%B0%ED%8F%AC/shop/shopping/node_modules/vite/dist/node/chunks/dep-51c4f80a.js:39967:19) at normalizeUrl (file:///C:/Users/home/Desktop/%EB%B0%B0%ED%8F%AC/shop/shopping/node_modules/vite/dist/node/chunks/dep-51c4f80a.js:36835:33) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async TransformContext.transform (file:///C:/Users/home/Desktop/%EB%B0%B0%ED%8F%AC/shop/shopping/node_modules/vite/dist/node/chunks/dep-51c4f80a.js:36968:47) at async Object.transform (file:///C:/Users/home/Desktop/%EB%B0%B0%ED%8F%AC/shop/shopping/node_modules/vite/dist/node/chunks/dep-51c4f80a.js:40224:30) at async loadAndTransform (file:///C:/Users/home/Desktop/%EB%B0%B0%ED%8F%AC/shop/shopping/node_modules/vite/dis

  • firebase
  • graphql
  • react
어벙리벙 댓글 1 좋아요 0 조회수 978

index.tsx에서 ProductItem부분에서 해당 반환 형식이 유효하지 않다고 할 때

해결됨

풀스택 리액트 라이브코딩 - 간단한 쇼핑몰 만들기

index.tsx에서 ProductItem부분에서 해당 반환 형식이 유효하지 않다고 하면서 화면에 Display되지 않을때 어디를 확인하면 되는지 조언 부탁드립니다~ 데이터는 BASE_URL로 부터 잘 오고 있습니다 mac에서 vsc사용하고 있습니다 아래는 해당부분입니다 import { useQuery } from "react-query" import ProductItem from "../../components/product/item" import { fetcher, QueryKeys } from "../../queryClient" import {Product} from "../../types" const ProductList = () => { const {data} = useQuery<Product[]>(QueryKeys.PRODUCTS, () => fetcher({ method: 'GET', path: '/products' }), ) /* id: 1 title: "Fjallraven - Foldsack No. 1 Backpack, Fits 15 Laptops" price: 109.95 description: "Your perfect pack for everyday use and walks in the forest. Stash your laptop (up to 15 inches) in the padded sleeve, your everyday" category: "men's clothing" image: "https://fakestoreapi.com/img/81fPKd-2AYL._AC_SL1500_.jpg" ▶ rating 2 items rate: 3.9 count: 120 */ return ( <div> <ul> {data?.map(product => ( <ProductItem {...product} key={product.id} /> ))} </ul> </div> ) //return (<div>상품목록</div>) } export default ProductList components/product/item.tsx 파일입니다

  • graphql
  • firebase
  • react
givita_dev 댓글 2 좋아요 0 조회수 491

여러번 계속 돌려보고했는데 오류를 못찾겠습니다 ㅜㅜ

미해결

MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React

이거는 reple 입니다. 리플 모델입니다. 이거는 댓글 입력했을때 들어오는 값이랑 맨위에 사진17번째줄 콘솔입니다. 포스트아이디가 없습니다.. 포스트 area 에서 postInfo 를 콘솔한것이 이것 이며 여기서 props.postID 를 가져오지를 못해서.. 값이 안들어가는것 같습니다. 혹시 강의가 업데이트 되거나 제가 잘못한 부분이있을까요..? PostArea.js 에서 댓글지역으로 프롭이렇게 보냈습니다 영상과같이.

  • nodejs
  • express
  • firebase
  • mongodb
  • react
댓글 1 좋아요 1 조회수 573

firebase 연결 파일 재다운로드 관련

미해결

지금 저희 회사에서 개발하고 있는 앱에 푸시메세지와 애널리틱스, 다이나믹 링크를 사용하기 위해 파이어베이스를 사용하고 있는데, 파이어베이스 설정시에 다운받게 되는 google-service.json 파일 또는 GoogleService-Info.plist 파일을 콘솔에서 다시 다운받아서 연결해도 기존 설정에 문제가 없을까요?

  • firebase
key0129mw 댓글 0 좋아요 0 조회수 166

파이어베이스 리얼타임 데이터베이스 불러오기 - 질문

미해결

[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)

질문 : 파이어베이스 리얼타임 데이터베이스에 날짜와 메모가 입력이 잘되었는데 어플 창에는 날짜가 뜨지 않습니다. -adapter_list.notifyDataSetChanged()하기 전까지는 날짜가 잘 떳는데 그 다음부턴 날짜가 파이어베이스에만 입력되고 어플 창에는 뜨지 않습니다 ㅜㅜ 왜이런걸까요? -파이어베이스 리얼타임 데이터베이스에 입력이 잘됨 문제 화면: 어플 화면에 날짜가 안뜸 -MainActivity.kt 코드입니다 package com.ipari.diet_memo import android.app.DatePickerDialog import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.view.LayoutInflater import android.widget.* import androidx.appcompat.app.AlertDialog import com.google.firebase.auth.ktx.auth import com.google.firebase.database.DataSnapshot import com.google.firebase.database.DatabaseError import com.google.firebase.database.ValueEventListener import com.google.firebase.database.ktx.database import com.google.firebase.ktx.Firebase import java.util.* class MainActivity : AppCompatActivity() { val dataModelList = mutableListOf<DataModel>() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val database = Firebase.database val myRef = database.getReference("myMemo") val listView = findViewById<ListView>(R.id.mainLV) val adapter_list = ListViewAdapter(dataModelList) listView.adapter= adapter_list Log.d("DataModel------", dataModelList.toString()) myRef.child(Firebase.auth.currentUser!!.uid).addValueEventListener(object : ValueEventListener{ override fun onDataChange(snapshot: DataSnapshot) { dataModelList.clear() for (dataModel in snapshot.children) { Log.d("Data", dataModel.toString()) dataModelList.add(dataModel.getValue(DataModel::class.java)!!) } adapter_list.notifyDataSetChanged() Log.d("DataModel", dataModelList.toString()) } override fun onCancelled(error: DatabaseError) { } }) val writeButton = findViewById<ImageView>(R.id.writeBtn) writeButton.setOnClickListener { val mDialogView = LayoutInflater.from(this).inflate(R.layout.custom_dialog, null) val mBuilder = AlertDialog.Builder(this) .setView(mDialogView) .setTitle("운동 메모 다이얼로그") val mAlertDialog = mBuilder.show() val DateSelectBtn = mAlertDialog.findViewById<Button>(R.id.dataSelectBtn) var dateText="" DateSelectBtn?.setOnClickListener { val today = GregorianCalendar() val year : Int = today.get(Calendar.YEAR) val month : Int = today.get(Calendar.MONTH) val date : Int = today.get(Calendar.DATE) val dlg = DatePickerDialog(this, object : DatePickerDialog.OnDateSetListener{ override fun onDateSet(view: DatePicker?, year: Int, month: Int, dayOfMonth: Int ) { Log.d("MAIN", "${year}, ${month +1}, ${dayOfMonth}") DateSelectBtn.setText("${year}, ${month +1}, ${dayOfMonth}") dateText = "${year}, ${month +1}, ${dayOfMonth}" } }, year, month, date) dlg.show() } val saveBtn = mAlertDialog.findViewById<Button>(R.id.saveBtn) saveBtn?.setOnClickListener { val healthMemo = mAlertDialog.findViewById<EditText>(R.id.healthMemo)?.text.toString() val database = Firebase.database val myRef = database.getReference("myMemo").child(Firebase.auth.currentUser!!.uid) val model = DataModel(dateText, healthMemo) myRef .push() .setValue(model) mAlertDialog.dismiss() } } } }

  • kotlin
  • firebase
  • android
신영현 댓글 1 좋아요 0 조회수 1049

댓글 여러개 작성시 댓글이 안보임

해결됨

[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)

선생님 저 질문이있어서 이렇게 문의드립니다. 댓글 불러오기강의에서 댓글을 여러개 작성을 하게 되면 사진에 보이는 것처럼 댓글을 새로 작성해도 화면에 보이지 않고있습니다. infinite/endless scroll(무한 스크롤)기능을 추가해야하는지 싶어서 이렇게 문의드립니다. activity_board_inside.xml <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".board.BoardInsideActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="60dp"> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/titleArea" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="50dp" android:layout_marginRight="50dp" android:gravity="center" android:text="title" android:textColor="@color/black" android:textSize="20sp" android:textStyle="bold" /> <ImageView android:id="@+id/boardSettingIcon" android:layout_width="20dp" android:layout_height="40dp" android:layout_margin="10dp" android:src="@drawable/main_menu" android:visibility="invisible" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0.5dp" android:background="@color/black"> </LinearLayout> <TextView android:id="@+id/timeArea" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="10dp" android:gravity="right" android:text="time" /> <TextView android:id="@+id/textArea" android:layout_width="match_parent" android:layout_height="200dp" android:layout_margin="20dp" android:background="@drawable/background_radius" android:padding="10dp" android:text="여기는 내용 영역" android:textColor="@color/black" /> <ImageView android:id="@+id/getImageArea" android:layout_width="match_parent" android:layout_height="300dp" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" /> <ListView android:id="@+id/commentLV" android:layout_width="match_parent" android:layout_height="600dp" /> </LinearLayout> </ScrollView> <LinearLayout android:layout_width="match_parent" android:layout_alignParentBottom="true" android:background="@color/white" android:layout_height="60dp"> <EditText android:id="@+id/commentArea" android:hint="댓글을 입력해주세요" android:layout_marginLeft="10dp" android:layout_width="320dp" android:layout_height="match_parent" android:background="@android:color/transparent"/> <ImageView android:id="@+id/commentBtn" android:src="@drawable/btnwrite" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> </RelativeLayout> </layout> BoardInsideActivity.kt package com.example.mysolelife.board import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.view.LayoutInflater import android.widget.Button import android.widget.Toast import androidx.appcompat.app.AlertDialog import androidx.core.view.isVisible import androidx.databinding.DataBindingUtil import com.bumptech.glide.Glide import com.example.mysolelife.R import com.example.mysolelife.comment.CommentLVAdapter import com.example.mysolelife.comment.CommentModel import com.example.mysolelife.databinding.ActivityBoardInsideBinding import com.example.mysolelife.utils.FBAuth import com.example.mysolelife.utils.FBRef import com.google.android.gms.tasks.OnCompleteListener import com.google.firebase.database.DataSnapshot import com.google.firebase.database.DatabaseError import com.google.firebase.database.ValueEventListener import com.google.firebase.ktx.Firebase import com.google.firebase.storage.ktx.storage import java.lang.Exception class BoardInsideActivity : AppCompatActivity() { private val TAG = BoardInsideActivity::class.java.simpleName private lateinit var binding : ActivityBoardInsideBinding private lateinit var key : String private val commentDataList = mutableListOf<CommentModel>() private lateinit var commentAdapter : CommentLVAdapter override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = DataBindingUtil.setContentView(this, R.layout.activity_board_inside) binding.boardSettingIcon.setOnClickListener { showDialog() } // 첫 번째 방법 /* val title = intent.getStringExtra("title").toString() val content = intent.getStringExtra("content").toString() val time = intent.getStringExtra("time").toString() binding.titleArea.text = title binding.textArea.text = content binding.timeArea.text = time*/ // 두 번째 방법 key = intent.getStringExtra("key").toString() getBoardData(key) getImageData(key) binding.commentBtn.setOnClickListener { insertComment(key) } commentAdapter = CommentLVAdapter(commentDataList) binding.commentLV.adapter = commentAdapter getCommentData(key) } private fun getBoardData(key : String) { val postListener = object : ValueEventListener { override fun onDataChange(dataSnapshot: DataSnapshot) { try { val dataModel = dataSnapshot.getValue(BoardModel::class.java) Log.d(TAG, dataModel!!.title) binding.titleArea.text = dataModel!!.title binding.textArea.text = dataModel!!.content binding.timeArea.text = dataModel!!.time val myUid = FBAuth.getUid() val writerUid = dataModel.uid if(myUid.equals(writerUid)) { binding.boardSettingIcon.isVisible = true } else { } } catch (e : Exception) { Log.d(TAG, "삭제완료") } } override fun onCancelled(databaseError: DatabaseError) { // Getting Post failed, log a message Log.w("ContentListActivity", "loadPost:onCancelled", databaseError.toException()) } } FBRef.boardRef.child(key).addValueEventListener(postListener) } private fun getImageData(key : String) { // Reference to an image file in Cloud Storage val storageReference = Firebase.storage.reference.child(key + ".png") // ImageView in your Activity val imageViewFromFB = binding.getImageArea storageReference.downloadUrl.addOnCompleteListener(OnCompleteListener { task -> if (task.isSuccessful) { Glide.with(this) .load(task.result) .into(imageViewFromFB) } else { binding.getImageArea.isVisible = false // 이미지 사진이 없을 때 } }) } private fun showDialog() { val mDialogView = LayoutInflater.from(this).inflate(R.layout.custom_dialog, null) val mBuilder = AlertDialog.Builder(this) .setView(mDialogView) .setTitle("게시글 수정/삭제") val alertDialog = mBuilder.show() alertDialog.findViewById<Button>(R.id.editBtn)?.setOnClickListener { Toast.makeText(this, "수정 버튼을 눌렀습니다", Toast.LENGTH_LONG).show() val intent = Intent(this, BoardEditActivity::class.java) intent.putExtra("key", key) startActivity(intent) } alertDialog.findViewById<Button>(R.id.removeBtn)?.setOnClickListener { FBRef.boardRef.child(key).removeValue() Toast.makeText(this, "삭제완료", Toast.LENGTH_LONG).show() finish() } } fun insertComment(key : String){ // 파이어베이스 구조 // comment // - BoardKey // - CommentKey // - CommentData // - CommentData // - CommentData FBRef.commentRef .child(key) .push() .setValue( CommentModel( binding.commentArea.text.toString(), FBAuth.getTime() ) ) Toast.makeText(this, "댓글 입력 완료", Toast.LENGTH_SHORT).show() binding.commentArea.setText("") } fun getCommentData(key: String){ val postListener = object : ValueEventListener { override fun onDataChange(dataSnapshot: DataSnapshot) { commentDataList.clear() for (dataModel in dataSnapshot.children) { val item = dataModel.getValue(CommentModel::class.java) commentDataList.add(item!!) } commentAdapter.notifyDataSetChanged() } override fun onCancelled(databaseError: DatabaseError) { // Getting Post failed, log a message Log.w(TAG, "loadPost:onCancelled", databaseError.toException()) } } FBRef.commentRef.child(key).addValueEventListener(postListener) } }

  • android
  • firebase
  • kotlin
봉구형 댓글 1 좋아요 0 조회수 350

data값이 안 받아와져요..

미해결

MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React

프록시 설정하고 응답요청했는데 console.log(요청)도 안되고 데이터자체가 안 받아와지는데 왜 그럴까요..?

  • mongodb
  • express
  • nodejs
  • firebase
  • react
pooh2_2000 댓글 2 좋아요 2 조회수 475

파이어베이스 realtime datatbase 데이터에 안뜹니다.

미해결

[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)

안녕하세요. firebase 데이터 추가 강의 듣고 있습니다. 실행에 오류는 없는데 눌러도 데이터에 변화가 없습니다. class ContentListActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_content_list) // Write a message to the database val database = Firebase.database val myRef = database.getReference("contents") myRef.push().setValue( ContentModel("title1", "https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FblYPPY%2Fbtq66v0S4wu%2FRmuhpkXUO4FOcrlOmVG4G1%2Fimg.png", "https://philosopher-chan.tistory.com/1235?category=941578") ) myRef.push().setValue( ContentModel("title2", "https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FznKK4%2Fbtq665AUWem%2FRUawPn5Wwb4cQ8BetEwN40%2Fimg.png", "https://philosopher-chan.tistory.com/1236?category=941578") ) myRef.push().setValue( ContentModel("title3", "https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbtig9C%2Fbtq65UGxyWI%2FPRBIGUKJ4rjMkI7KTGrxtK%2Fimg.png", "https://philosopher-chan.tistory.com/1237?category=941578") ) val rv : RecyclerView = findViewById(R.id.rv) //리사이클 뷰 생성 // 데이터 삽입 val items = ArrayList<ContentModel>() items.add(ContentModel("title1", "https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FblYPPY%2Fbtq66v0S4wu%2FRmuhpkXUO4FOcrlOmVG4G1%2Fimg.png", "https://philosopher-chan.tistory.com/1235?category=941578")) items.add(ContentModel("title2", "https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FznKK4%2Fbtq665AUWem%2FRUawPn5Wwb4cQ8BetEwN40%2Fimg.png", "https://philosopher-chan.tistory.com/1236?category=941578")) items.add(ContentModel("title3", "https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbtig9C%2Fbtq65UGxyWI%2FPRBIGUKJ4rjMkI7KTGrxtK%2Fimg.png", "https://philosopher-chan.tistory.com/1237?category=941578")) val rvAdapter = ContentRVAdapter(baseContext, items) //어뎁터 생성 rv.adapter = rvAdapter rv.layoutManager = GridLayoutManager(this, 2) rvAdapter.itemClick = object : ContentRVAdapter.ItemClick{ override fun onClick(view: View, position: Int) { Toast.makeText(baseContext, items[position].title, Toast.LENGTH_LONG).show() val intent = Intent(this@ContentListActivity, ContentShowActivity::class.java) //url 넘겨주기 intent.putExtra("url", items[position].webUrl) startActivity(intent) } } } }

  • firebase
  • android
  • kotlin
이하진 댓글 2 좋아요 0 조회수 381

Unresolved reference: item

미해결

[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)

안녕하세요. 컨텐츠 리스트 만들기 - RecyclerView 2 강의의 7:17를 듣고 있습니다. 강의 똑같이 따라 치고 있는데 Unresolved reference: item 라고 오류가 나는데 왜 그러는 걸까요? package com.example.mysololife.contentsList import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import com.example.mysololife.R class ContentRVAdapter (val items : ArrayList<ContentModel>) : RecyclerView.Adapter<ContentRVAdapter.Viewholder>() { //아이템 하나 하나 가져와 하나의 레이아웃 만들기 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ContentRVAdapter.Viewholder { val v = LayoutInflater.from(parent.context).inflate(R.layout.content_rv_item, parent, false) return Viewholder(v) } override fun onBindViewHolder(holder: Viewholder, position: Int) { holder.bindItems(items[position]) } //전체 아이템의 갯수가 몇 개 override fun getItemCount(): Int { return items.size } // 아이템의 내용물을 넣을 수 있도록 연결 inner class Viewholder(itemView: View): RecyclerView.ViewHolder(itemView){ fun bindItems(items : ContentModel){ val contetTitle = itemView.findViewById<TextView>(R.id.textArea) contetTitle.text = item.title } } }

  • firebase
  • kotlin
  • android
이하진 댓글 4 좋아요 0 조회수 618

npm run start를 치면 흰 화면만 뜹니다

미해결

따라하며 배우는 리액트, 파이어베이스 - 채팅 어플리케이션 만들기[2023.12 리뉴얼]

안녕하세요. 강의를 듣다가 막히는 부분이 생겨 질문 드립니다. VSC상에서 npm install react-router-dom --save를 칠 때부터 이런 종류의 문구가 뜨더니, npm run start를 하면 새로운 포트로 연결이 성공되었다는 문구는 뜨지만, 아무 글씨도 나타나지 않은 흰 배경만 있습니다. 혹시 어떤 점이 문제인지 알 수 있을까요?? 구글링도 해보고 npm audit?? 그것도 시도해봤는데 해결되지 않습니다ㅠㅠㅠ *현재 window쓰고 있고, VSC로 작업하고 있습니다 *App.js 코드 첨부하겠습니다. import React from "react"; import { Routes, Route} from "react-router-dom"; import ChatPage from "./components/ChatPage/ChatPage"; import LoginPage from "./components/LoginPage/LoginPage"; import RegisterPage from "./components/RegisterPage/RegisterPage"; function App(props) { return ( <Routes> <Route path="/" element={<ChatPage />} /> <Route path="/login" element={<LoginPage />} /> <Route path="/register" element={<RegisterPage />} /> </Routes> ); } export default App;

  • react
  • firebase
  • 웹앱
suminei 댓글 2 좋아요 0 조회수 803

안녕하세요

해결됨

Flutter 앱 개발 기초

안녕하세요 제가 문제점이 두개가있습니다 제가 사용하는것은 윈도우 안드로이드입니다 저는 ios 파일밑에 Podfile이 안보입니다 그리고 또하나는 Firebase에 에러를 고치려고하는데 임포트가없습니다 이렇게 다 깔았고 다있는걸로 확인했는데 안보이네요 ㅠ

  • ios
  • firebase
  • Flutter
우주인평강PK 댓글 1 좋아요 1 조회수 364

firebase.fcm.v1.Fcmerror

미해결

스프링부트에서 안드로이드로 알림 버튼을 누르면 다음과 같은 오류가 나왔습니다. 블로그들을 찾아보니 키 생성을 다시 하고 키 값이 일치하지 않는다 하여서 파이어베이스에 새로운 프로젝트를 등록하고 키를 새로 생성해서 스프링부트에 넣어줬습니다. 하지만 여전히 문제는 해결이 되지 않습니다. 어떻게 해야 할지 제발 알려주세요.. 2주동안 고생하고 있습니다.

  • springboot
  • firebase
  • 알람
  • fcmerror
qud902 댓글 0 좋아요 0 조회수 325

강의 질문이요

미해결

[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)

이 앱을 만들고 본인이 그 앱에 게시물을 올리면 자기만 볼 수 있게 할 수 있나요?? 몇 개를 올리고 자기가 올린 게시물만 모아볼 수 있게요..

  • android
  • firebase
  • kotlin
이다연 (Lee da-yeon) 댓글 1 좋아요 0 조회수 291

프래그먼트 바인딩

미해결

[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)

똑같이 따라했는데 이런 오류가 생겼어요,, 검색해도 잘 안 나오고 뭐가 문제인지 모르겠습니다ㅠㅠ

  • firebase
  • kotlin
  • android
댓글 3 좋아요 0 조회수 473

인기 태그

인프런 TOP Writers

주간 인기글