• 카테고리

    질문 & 답변
  • 세부 분야

    모바일 앱 개발

  • 해결 여부

    해결됨

The binary version of its metadata is 1.9.0, expected version is 1.7.1.

23.08.11 21:36 작성 조회수 605

0

auth = Firebase.auth

강의에서 이 부분을 작성하고 코드를 돌린 후에 The binary version of its metadata is 1.9.0, expected version is 1.7.1. 라는 문제가 발생하였습니다. 찾아보니 최신버전이 아니라서 그럴 수 있다고 하여서

File -> Settings -> Appearance & Behavior -> System Settings -> Updates로 들어가서 최신 버전으로 업데이트도 해보고 build.grandle 파일 2개에 이것저것 추가도 해봤지만 결과는 같았습니다.

buildscript {
    ext {
        agp_version = '7.4.1'
    }

    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.google.gms:google-services:4.3.15'
    }
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '7.4.1' apply false
    id 'com.android.library' version '7.2.2' apply false
    id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
    id("com.google.gms.google-services") version "4.3.15" apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-android-extensions'
    // 위 선언시 val joinBtn = findViewById<Button>(R.id.joinBtn) 이처럼 따로 설정 안해주고 바로 쓸 수 있다
    id 'com.google.gms.google-services'
}

android {
    compileSdk 33

    defaultConfig {
        applicationId "com.example.sogating_final"
        minSdk 19
        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'
    }
    buildFeatures {
        viewBinding true
    }
}

dependencies {

    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.annotation:annotation:1.2.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1' // 최신 버전으로 변경
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1' // 최신 버전으로 변경
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    implementation "com.yuyakaido.android:card-stack-view:2.3.4"

    implementation(platform("com.google.firebase:firebase-bom:32.2.2"))
    implementation("com.google.firebase:firebase-analytics-ktx")
    implementation("com.google.firebase:firebase-auth-ktx")
}

asd.PNG더 찾아보니 kotlin-version과 gradle-version을 변경하라고 하는데 지금 버전이 문법이 달라서인지 정확하게 나와있는것을 찾기 힘들어서 질문 드립니다!

답변 1

답변을 작성해보세요.

0

안녕하세요

몇가지 정보가 필요한데요.

 

  1. 이 에러가 나기 전에 어디까지 코딩을 하셨나요? 가능하면 전체 코드를 압축해서 구글 드라이브 or 깃허브에 올려서 공유해주세요.

  2. 어떤 코드를 넣고 나서 에러가 났나요?

  3. 현재 에러가 나오 있는고 있는 전체 코드를 압축해서 구글 드라이브 or 깃허브에 올려서 공유해주세요.

개발자님의 프로필

개발자

질문자

2023.08.11

https://drive.google.com/file/d/1lHnsKdOXF0oQHnHsUirsyeo10X0Hj9JA/view?usp=sharing

강의에서 파이어베이스 연동해서 회원가입 기능 구현 화면을 작성하고 돌릴때 에러가 났습니다.

package com.example.sogating_final.auth

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.widget.Button
import android.widget.Toast
import com.example.sogating_final.R
import com.google.firebase.auth.FirebaseAuth
import com.google.firebase.auth.ktx.auth
import com.google.firebase.ktx.Firebase
import kotlinx.android.synthetic.main.activity_intro.*
import kotlinx.android.synthetic.main.activity_intro.joinBtn
import kotlinx.android.synthetic.main.activity_join.*

class JoinActivity : AppCompatActivity() {

    private val TAG = "JoinActivity"
    private lateinit var auth: FirebaseAuth

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_join)

        auth = Firebase.auth

        joinBtn.setOnClickListener {

            auth.createUserWithEmailAndPassword(emailArea.text.toString(), pwdArea.text.toString())
                .addOnCompleteListener(this) { task ->
                    if (task.isSuccessful) {
                        // Sign in success, update UI with the signed-in user's information
                        Log.d(TAG, "createUserWithEmail:success")

                    } else {
                        // If sign in fails, display a message to the user.
                        Log.w(TAG, "createUserWithEmail:failure", task.exception)
                    }
                }
        }

    }
}


링크에 들어가니 아래와 같이 나오네요.

image

가능하면

  • 에러가 나기 전 코드

  • 에러가 난 후에 코드

    둘다 공유해주시면 문제파악이 쉽습니다.

개발자님의 프로필

개발자

질문자

2023.08.16

https://github.com/inhachoi/sogaeting1.git
master브랜치에 오류 전, 후 코드 올렸습니다.

JoinActivity만 코드 변경이 있습니다.