작성
·
229
0
파이어베이스 회원가입 구현 부분에서 emailArea 와 passwordArea, passwordArea2 이 부분이 빨간색이며
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.res.ParseLibraryResourcesTask$ParseResourcesRunnable
이런 오류가 나요. ㅜㅜ 그리고
package com.juwon.mysolelife.auth
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Toast
import androidx.databinding.DataBindingUtil
import com.google.firebase.Firebase
import com.google.firebase.auth.FirebaseAuth
import com.google.firebase.auth.auth
import com.juwon.mysolelife.R
import com.juwon.mysolelife.databinding.ActivityIntroBinding
class JoinActivity : AppCompatActivity() {
private lateinit var auth: FirebaseAuth
private lateinit var binding: ActivityIntroBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = DataBindingUtil.setContentView(this, R.layout.activity_join)
setContentView(R.layout.activity_join)
binding.joinBtn.setOnClickListener {
val email = binding.emailArea.text.toString()
val password1 = binding.passwordArea.text.toString()
val password2 = binding.passwordArea2.text.toString()
if(email.isEmpty()) {
Toast.makeText(this, "이메일을 입력 해 주세요", Toast.LENGTH_LONG).show()
}
}
auth = Firebase.auth
// auth.createUserWithEmailAndPassword(email, password)
auth.createUserWithEmailAndPassword("sjw9179@kakao.com", "tlswndnjs1!")
.addOnCompleteListener(this) { task ->
if (task.isSuccessful) {
Toast.makeText(this, "성공", Toast.LENGTH_LONG).show()
} else {
Toast.makeText(this, "실패", Toast.LENGTH_LONG).show()
}
}
}
}
이런식으로 코드가 짜여있습니다.