35,200원
다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
파일 압축 폴더관련해서 질의입니다.
파일 압축풀면 bat이 포함되어 있어 바이러스 권장합니다. 나오는데요. 이거 그냥 예하면 되나요?
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
회원가입 파이어 베이스 질문입니다.
가입은 되는데 가입버튼을 누를 때 처음엔 실패나 성공 메세지가 생성이 안됩니다. 그리고 가입을 3~4번하고 난 후에 다시 가입버튼 누를 때 실패나 성공 메세지가 생성됩니다.2023-03-10 03:55:08.889 7397-7482/com.example.myapplication666 W/System: Ignoring header X-Firebase-Locale because its value was null. 이런 로그가 띄어집니다.
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
로그 문의입니다.
로그기록볼 떄 no debuggable processes 로그가 안보이는데요. 아래 화면처럼 벌레모양 눌러도 안보일 때는 어떻게 해야 하나요? https://comoi.io/147
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
파이어베이스 회원가입 질문입니다.
.
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
파이어베이스 sdk질문입니다.
파이어베이스 질문있습니다. 제가 사용하고 있는 안드로이드는 2022-12 이후버전이고 https://gainful-topaz-82f.notion.site/Firebase-8aa3137487b84fd3afe60d90e0702986 이 링크에서 나오는 2번째 방법으로 따라했는데요. 링크대로 하면 작동되는데 구글에서 나오는 allprojects까지 입력하면 에러가 나옵니다.구글에서는 allprojects까지 입력하라고 나와있어서 입력했는데 build.gradle': 22: only buildscript {} and other plugins {} script blocks are allowed before plugins {} blocks, no other statements are allowed 이런 에러가 나왔습니다. 왜나오는지 알수있을까요? Firebase SDK에서 google-services.json 구성 값에 액세스할 수 있도록 하려면 Google 서비스 Gradle 플러그인이 필요합니다.프로젝트 수준 build.gradle 파일에 플러그인을 buildscript 종속 항목으로 추가합니다.루트 수준(프로젝트 수준) Gradle 파일(<project>/build.gradle):buildscript { repositories { // Make sure that you have the following two repositories google() // Google's Maven repositorycontent_copy mavenCentral() // Maven Central repositorycontent_copy } dependencies { ... // Add the dependency for the Google services Gradle plugin classpath 'com.google.gms:google-services:4.3.15'content_copy }}allprojects { ... repositories { // Make sure that you have the following two repositories google() // Google's Maven repositorycontent_copy mavenCentral() // Maven Central repositorycontent_copy }}
- 해결됨[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
어댑터 Context
ContentsListActivity에서 어댑터에 context를 넣어줄 때는 baseContext를 쓰고, BookmarkFragment.kt 에서 어댑터에 context를 넣어줄 때는 requireContext()로 다르게 쓰신 이유가 있으실까요?
- 해결됨[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
클릭 이벤트 처리
코드 다듬기 전에 쓰신 클릭 이벤트 처리 방식과 코드 다듬기 후에 쓰신 클릭 이벤트 방식 중 보통 어느 쪽을 더 많이 쓰시나요? 만일 후자(전자)의 방식을 더 많이 쓴다면 성능 상 낫다든가, 혹은 다른 이유 등 전자(후자)를 쓰는 이유가 있을까요?
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
댓글 ListView BaseAdapter position 버그 질문
한사람이 게시글을 작성하면 그 아래 여러사람이 댓글을달고 댓글을 쓴 본인만 댓글을 삭제할수 있도록 구현하려고 합니다. 문제는 한 게시글에 여러사람이 댓글을 달았을때 listView의 getView 메서드의 position이 해당 인덱스의 위치를 잘못된 값을 나타냅니다.Log로 찍어봤을때 해당 댓글들의 키 배열들은 정상적으로 있으나 두 댓글다 position을 찍어봤을때 0을 찍고 있습니다.(제 생각대로는 첫번째 댓글을 찍으면 0, 두번째 댓글을 찍으면 1이 로그에 찍힘) 왜 리스트뷰가 해당 position이 제대로 찍히지 않는 이유가 궁금합니다! 해당 코드입니다.게시글 내부 댓글부분 코드var commentlist = ArrayList<CommentModel>() var commentKeyList = ArrayList<String>() var commentLV = binding.commentLV var lvAdpater = CommentAdapter(commentlist , commentKeyList , key ) commentLV.adapter = lvAdpater val postListener = object : ValueEventListener { override fun onDataChange(dataSnapshot: DataSnapshot) { commentlist.clear() commentKeyList.clear() for(dataModel in dataSnapshot.children){ val item = dataModel.getValue(CommentModel::class.java) if (item != null) { commentlist.add(item) commentKeyList.add(dataModel.key.toString()) } } lvAdpater.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)class CommentAdapter(var list : ArrayList<CommentModel> , var keyList : ArrayList<String>, var key : String): BaseAdapter() { var applicantID : String = "" override fun getCount(): Int { return list.size } override fun getItem(p0: Int): Any { return list[p0] } override fun getItemId(p0: Int): Long { return p0.toLong() } override fun getView(position: Int, p1: View?, p2: ViewGroup?): View { var view = p1 if(p1 == null){ view = LayoutInflater.from(p2?.context).inflate(R.layout.comment_item, p2, false) } val applicant = view?.findViewById<TextView>(R.id.applicant) val content = view?.findViewById<TextView>(R.id.contentArea) val time = view?.findViewById<TextView>(R.id.timeArea) applicant?.text = list[position].applicant applicantID = list[position].applicantID content?.text = list[position].comment time?.text = list[position].time var removeBtn = view!!.findViewById<ImageView>(R.id.removeBtn) // var inviteBtn = view!!.findViewById<Button>(R.id.inviteBtn) if(FBAuth.getUid().equals(applicantID)){ removeBtn.isVisible = true removeBtn.setOnClickListener { var commentKey = keyList[position] Log.e("key",keyList.toString()) Log.e("key", position.toString()) var dlg = AlertDialog.Builder(view.context) dlg.setTitle("댓글을 삭제하겠습니까?") dlg.setPositiveButton("확인", DialogInterface.OnClickListener { dialogInterface, i -> FBRef.commentRef.child(key).child(commentKey).removeValue() }) dlg.setNegativeButton("취소",null) dlg.show() } } return view!! } }
- 해결됨[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
isEmpty가 unresolved references 오류
isEmpty함수를 따라 쓰려 하자 unresolved references 오류가 발생하며 사용할 수 없어서 대체로 length가 0인 것을 하려고 하자 노란줄이 뜨면서 isEmpty를 추천해주는데 여전히 사용이 안되는데 혹시 왜 그런지 아시나요?
- 해결됨[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
firebase 관련 import에서 오류가 발생합니다
auth 부분에서도 import가 되지 않는 오류가 발생했는데 이전에는 방법을 찾아서 무시하고 일단 넘어갔는데 realtime database에서도 여전히 문제가 발생합니다.다음과 같이 Firebase를 import하려고 하면 Unresolved reference:Firebase라고 뜹니다. import 선택지는 뜨지도 않고요.. 이전에 auth에서도 동일한 문제가 발생했는데 어떻게 고치고 왜 그런지 아시나요? implementation도 추가했습니다
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
파이어베이스 연결 문제
회원가입 부분에서 막혔는데요,sampleapp 실행할 땐 문제없이 잘 돌아갔었습니다. 근데 mysololife에서는 회원가입을 하려고 하면W/System: Ignoring header X-Firebase-Locale because its values was null이렇게 나오네요 비밀번호 6자리 이상 설정해봤습니다. 에뮬레이터 인터넷 연결 되어있습니다파이어베이스 로그인 제공업체 설정 되어있습니다. 전에 했던 sampleapp은 잘 돌아가서 참고해도 다른게 없어 도저히 이유를 모르겠네요..ㅠ
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
auth 부분은 import가 되는데 실행하면 오류가 납니다.
auth import 하고 실행하면 저렇게 오류가 납니다..ㅠㅠ 왜그런건지 잘 모르겠습니다
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
fragment layout이 시뮬레이터에 안나옵니다
안녕하세요프래그먼트 layout이 design탭에선 보이는데 시뮬레이터에선 안나와서요.activity_main.xml 의 아래 main_nav가 desgin탭에선 보이는데, 시뮬레이터에선 안나옵니다. <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:text="test"/> <androidx.fragment.app.FragmentContainerView android:id="@+id/fragmentContainerView" android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="60dp" app:defaultNavHost="true" app:navGraph="@navigation/main_nav" /> main_nav.xml 에는 homeFragmenet가 홈으로 되어있습니다.<navigation 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" android:id="@+id/main_nav" app:startDestination="@id/homeFragment"> <fragment android:id="@+id/homeFragment" android:name="com.example.singlelife.fragments.HomeFragment" android:label="fragment_home" tools:layout="@layout/fragment_home" /> fragment_home.xml에는 textView하나만 넣어보았는데, 역시 디자인뷰에선 보이는데, 시뮬레이터에서 안나와요;<?xml version="1.0" encoding="utf-8"?> <layout xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".fragments.HomeFragment"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="beeeeeeeee" android:textSize="30sp"/> </FrameLayout> </layout>시뮬레이터 실행 시 HomeFragment.kt 아래의 토스트와 로그는 잘뜹니다.. 왜 레이아웃만 보이질않을까요;; class HomeFragment : Fragment() { private lateinit var binding : FragmentHomeBinding override 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_home, container, false) Toast.makeText(context, "t", Toast.LENGTH_SHORT).show() Log.d("dddddddddddddddd", "TTTTTTTTTTTTTTTTTTT") return binding.root } 항상 질 좋은 강의 잘 듣고 있습니다. 감사합니다!
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
문의
안녕하세요 좋은강의를 차분하고 빠르게 잘 진행해주셔서 이전 초보 강의에 이어 이번 강의도 듣고있습니다. 저는 강의를 들으며 따라하고, 복습 차 한번 더 다른 프로젝트에 동일하게 만들어보는 식으로 공부하고 있는데요. 혹시 해당 강의에서 진행한 내용을 복습의 개념으로 제 깃헙에 올려도 될까요?
- 해결됨[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
로그인 no 로 나오고 파이어베이스 사용자에 데이터가 안 들어옵니다
import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.Button import android.widget.Toast import com.google.firebase.auth.FirebaseAuth import com.google.firebase.auth.ktx.auth import com.google.firebase.ktx.Firebase class MainActivity : AppCompatActivity() { private lateinit var auth: FirebaseAuth override fun onCreate(savedInstanceState: Bundle?) { // Initialize Firebase Auth auth = Firebase.auth // 초기화 super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val joinBtn = findViewById<Button>(R.id.join) joinBtn.setOnClickListener{ auth.createUserWithEmailAndPassword("abc@abc.com", "1234") .addOnCompleteListener(this) { task -> if (task.isSuccessful) { // Sign in success, update UI with the signed-in user's information Toast.makeText(this, "ok", Toast.LENGTH_SHORT).show() } else { // If sign in fails, display a message to the user. Toast.makeText(this, "no", Toast.LENGTH_SHORT).show() } } } } }plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id 'com.google.gms.google-services' } android { namespace 'com.suyeon.mysampleapp2' compileSdk 32 defaultConfig { applicationId "com.suyeon.mysampleapp2" minSdk 19 targetSdk 32 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'com.google.android.material:material:1.5.0' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' implementation platform('com.google.firebase:firebase-bom:31.2.0') implementation 'com.google.firebase:firebase-analytics-ktx' implementation 'com.google.firebase:firebase-auth-ktx' }// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() mavenCentral() } dependencies { classpath 'com.google.gms:google-services:4.3.15' } } plugins { id 'com.android.application' version '7.3.1' apply false id 'com.android.library' version '7.3.1' apply false id 'org.jetbrains.kotlin.android' version '1.7.20' apply false } 안녕하세요 선생님강의 잘 듣고 있습니다!다름 아니라 선생님 코드와 같이 작성해 실행했는데요.가상 디바이스 켜서 회원가입 버튼 누르면 'ok' 나오고 파이어베이스 인증 페이지에 abc@abc.com 관련 데이터가 들어오지 않습니다.로그인 실패한 경우인 no 가 토스트 메시지로 나오고 인증 페이지에서도 아무런 데이터가 나오지 않습니다.몇 번이나 빌드 새로 하고 코드도 비교해봤는데 제가 빼먹은 게 있는 건가요?별 다른 오류가 뜨진 않습니다. 관련 소스 함께 올립니다. 그리고 이전엔 안 그랬는데 오늘 디바이스를 실행하니 갑자기 속도가 굉장히 느려졌습니다.안드로이드 스튜디오말고도 전체적으로 인터넷 로딩 속도 등도 디바이스 실행할 때 느려지는데요. 이와 관련해 개선할 수 있는 방법이 있을까요? 감사합니다.
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
바인딩
안녕하세요. 바인딩 관련하여 질문이 있어 글 남깁니다. 바인딩을 할 때 다른 강의에서는 viewBinding를 사용하셨고 이 강의에서는 dataBinding을 사용하셨습니다. gradle 파일에 적용하는 코드도 다르고 Acitivity.kt파일에서 선언하는 방식도 다른데, 결국 두 바인딩 모두 뷰들의 직접참조를 허용하는 것 같습니다. 뷰 바인딩과 데이터 바인딩 간의 차이점이 궁금합니다. 크게 다르지 않다면 어떤 상황에서 각각의 기법이 유리함을 가지는지 알려주시면 감사하겠습니다.
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
navigation
안녕하세요 개발자님강의 잘 수강하고 있습니다 ! 아직 초보라 모르는 것이 많지만 강의 이해하면서 잘 따라가고 있습니다. 지금 navigation 으로 하단에 탭 만드는 부분을 수강 중인데 질문이 있어 질문드립니다.navigation이 어떤 기능이 있는 건지가 궁금합니다! 하단탭을 만들어줄 때는 navigation을 사용하여 만들어주는 것이 일반적인 건가요? 혹시 다른 방법도 있는지도 궁금합니다
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
buildscript 어디서 가져오나요?
이 부분에서 buildscript는 어디서 가져오셨는지 궁금해요
- 해결됨[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
파이어 베이스 회원가입 과정이 안됩니다.
안녕하세요 강의를 따라서 진행하고 있는데 회원가입 버튼을 누르면 토스트 메시지로 no 가 뜨고 이메일과 비밀번호로 회원가입이 되지 않습니다.gradle(app) 파일plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' id 'com.google.gms.google-services' } android { namespace 'com.example.sample' compileSdk 33 defaultConfig { applicationId "com.example.sample" minSdk 21 targetSdk 33 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation 'com.google.firebase:firebase-auth-ktx' implementation platform('com.google.firebase:firebase-bom:31.1.1') implementation 'com.google.firebase:firebase-analytics-ktx' implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.appcompat:appcompat:1.5.1' implementation 'com.google.android.material:material:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.4' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0' } gradle(프로젝트)// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() mavenCentral() } dependencies { classpath 'com.google.gms:google-services:4.3.14' } } plugins { id 'com.android.application' version '7.3.1' apply false id 'com.android.library' version '7.3.1' apply false id 'org.jetbrains.kotlin.android' version '1.7.20' apply false } MainActivity.ktpackage com.example.sample import android.icu.lang.UCharacter.GraphemeClusterBreak.T import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.Button import android.widget.Toast import com.google.firebase.auth.FirebaseAuth import com.google.firebase.auth.ktx.auth import com.google.firebase.ktx.Firebase class MainActivity : AppCompatActivity() { private lateinit var auth: FirebaseAuth override fun onCreate(savedInstanceState: Bundle?) { // Initialize Firebase Auth auth = Firebase.auth super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val joinBtnClicked = findViewById<Button>(R.id.joinBtn) joinBtnClicked.setOnClickListener{ auth.createUserWithEmailAndPassword("abc1@abc1.com", "1234") .addOnCompleteListener(this) { task -> if (task.isSuccessful) { Toast.makeText(this,"ok",Toast.LENGTH_SHORT).show() } else { Toast.makeText(this,"no",Toast.LENGTH_SHORT).show() } } } } }혹시 코드 상에서 잘못된 부분이 있을까요?
- 미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
게시글 삭제하는부분에서 질문이 있습니다.
게시글을 삭제한거를 다 보고데이터베이스를 확인하니realtime데이터베이스에서는 삭제가 됐지만이미지는 삭제가 안되었는데 혹시 강의 다음내용에서나오는지 궁금하네요~!