답변 5
0
DataBindingUtil.setContentView
이렇게 되어있지 않고
DataBindingUtil.inflate
이렇게 강의에서 썻던 것으로 기억하는데
강의 코드와 한번 비교해보시겠어요?
선생님 구글에서 뷰바인딩 검색해서
binding = ActivityIntroBinding.inflate(layoutInflater)
val view = binding.root
setContentView(view)
이렇게 했더니 넘어가네요
앗 제가 여러방법으로 했었군요
저 에러코드를 전체 공유해주시면 살펴보겠습니다.
viewbinding / databinding에 관한 부분은 제가 유튜브에 올려놨으니 관련 강의 참고하셔도 좋습니다.
Android View에 대한 접근 1-6 입니다.
0
이부분에서 계속 오류가나네요.. 도와주세요 ㅠ
위에는 오류나는부분이구요
밑에는 전체 코드 입니다
binding = DataBindingUtil.setContentView(this,R.layout.activity_intro)
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import com.chung.mymemul.databinding.ActivityIntroBinding
class IntroActivity : AppCompatActivity() {
private lateinit var binding: ActivityIntroBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// setContentView(R.layout.activity_intro)
binding = DataBindingUtil.setContentView(this,R.layout.activity_intro)
binding.loginBtn.setOnClickListener {
val intent = Intent(this, LoginActivity::class.java)
startActivity(intent)
}
binding.joinBtn.setOnClickListener {
val intent = Intent(this, JoinActivity::class.java)
startActivity(intent)
}
}
}
0
FAILURE: Build completed with 3 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
C:\Users\ko725\AndroidStudioProjects\game\MySoleLife\app\src\debug\google-services.json
C:\Users\ko725\AndroidStudioProjects\game\MySoleLife\app\src\google-services.json
C:\Users\ko725\AndroidStudioProjects\game\MySoleLife\app\google-services.json
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (32) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.appcompat:appcompat-resources:1.5.0.
AAR metadata file: C:\Users\ko725\.gradle\caches\transforms-2\files-2.1\ce81a25d8061a8a03c7214920f2a5e4a\appcompat-resources-1.5.0\META-INF\com\android\build\gradle\aar-metadata.properties.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [com.google.firebase:firebase-analytics-ktx:21.1.0] C:\Users\ko725\.gradle\caches\transforms-2\files-2.1\82690a40aa49e9210c9c606173186ae9\firebase-analytics-ktx-21.1.0\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="com.google.firebase.analytics.ktx" to force usage (may lead to runtime failures)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 11s
22 actionable tasks: 22 executed
import com.google.firebase.auth.ktx.auth도 있고
Build -> Clean Project / Rebuild Project 실행 후 다시한번 시도도 해봤는데 안됩니다 ㅠㅠ
0
음 잘하신 것 같은데 혹시 앱을 빌드(실행)하면 에러메세지가 어떻게 나오나요?
https://www.inflearn.com/questions/500661
이 질문과 동일하게 나오나요 아니면 다르게 나오나요?
스크린샷과 메세지 전체를 공유해주시겠어요?
0
선생님 정확히 다시 확인해봤는데요
이렇게 강의에 이렇게 써저 있어요
힘드네요 ㅠ.ㅠ
혹시몰라서 강의 내용 캡쳐올립니다.