[안드로이드 프로젝트]커뮤니티 앱 만들기-2

hyihyi·2022년 12월 2일
0

1. a와 b가 같은지 확인할 때

if(!A.equals(B))

2. 뒤로가기를 눌렀을 때 이전 화면이 나오는 게 아니라 앱을 종료시키고 싶을 때

intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK

3. build.gradle(:app)의 id 'com.google.gms.google-services' 에러날 때

build.gradle(:Project)의 처음에 아래의 코드를 먼저 Sync Now를 시키면 된다.

buildscript {
    repositories {
        // Make sure that you have the following two repositories
        google()  // Google's Maven repository

        mavenCentral()  // Maven Central repository

    }
    dependencies {
        // Add the dependency for the Google services Gradle plugin
        classpath 'com.google.gms:google-services:4.3.13'

    }
}

🙌결과

💭MainActivity

-> IntroActivity(로그아웃 버튼 눌렀을 때)

📢뒤로가기 버튼을 눌렀을 때 앱 종료

profile
자유롭게 쓴 나의 자유로운 Development voyage⛵

0개의 댓글