• 카테고리

    질문 & 답변
  • 세부 분야

    모바일 앱 개발

  • 해결 여부

    미해결

파이어베이스 gradle설정에서 에러가나와요

23.06.19 04:13 작성 조회수 525

0

일단 저는 홍학버전을 사용중이구요

강의대로 따라가다가 gradle구성이 제가쓰는 버전이랑 달라서 질문글 찾아보다가 해결방법이있어서 따라서 그대로 진행을 했거든요

그랬더니 이런 에러가나면서 sync가 안되는거예요..

일단 이게 에러 내용이구요

A problem occurred configuring root project 'test'.

> Could not resolve all files for configuration ':classpath'.

> Could not find com.google.gms.google-services:4.3.15:.

Required by:

project :

Possible solution:

- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

 

제가 사용한 코드전문을 포함하자면

프로젝트 gradle은

buildscript {
    repositories {
        google()  // Google's Maven repository
        mavenCentral()  // Maven Central repository
    }
    dependencies {
        classpath 'com.google.gms.google-services:4.3.15'
    }
}

plugins {
    id 'com.android.application' version '8.0.2' apply false
    id 'com.android.library' version '8.0.2' apply false
    id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
}

이거구요

build gradle은

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'com.google.gms.google-services'
}

android {
    namespace 'com.example.test'
    compileSdk 33

    defaultConfig {
        applicationId "com.example.test"
        minSdk 24
        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.8.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'com.android.identity:identity-credential:+'
    implementation 'com.google.android.gms:play-services-maps:18.1.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation files('libs/libDaumMapAndroid.jar')
    implementation platform('com.google.firebase:firebase-bom:32.1.1')
    implementation 'com.google.firebase:firebase-analytics-ktx'
}

이렇게 구성되어있습니다. 어떤문제가 있는걸까요?

답변 2

·

답변을 작성해보세요.

0

조용한 쥐님의 프로필

조용한 쥐

2023.12.09

술홍님 덕에 해결했습니다! 감사합니다!

0

술홍님의 프로필

술홍

질문자

2023.06.19

아~ 이건 질문글에 올라와있는 글을 보고 해결했습니다!

path대신에 plugin 안에

아래 코드를 넣어서 해결했습니다.

 

id 'com.google.gms.google-services' version '4.3.10' apply false