Android

Plugin [id: 'kotlin-android'] was not found in any of the following sources ์˜ค๋ฅ˜ ํ•ด๊ฒฐ

๋…ธ๋ฃจ๋ฃฝ 2021. 5. 23. 18:02

Plugin [id: 'kotlin-android'] was not found in any of the following sources

Plugin [id: 'kotlin-kapt'] was not found in any of the following sources

plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
}

Room ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์“ฐ๋ ค๊ณ  plugin์— 'kotlin-android'์™€ 'kotlin-kapt'๋ฅผ ์ถ”๊ฐ€ํ•˜๋‹ˆ๊นŒ ์ด์™€ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋‚ฌ๋‹ค.๐Ÿ˜ข

 

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

Project ๋ ˆ๋ฒจ์˜ Gradle ํŒŒ์ผ๋กœ ๊ฐ„๋‹ค.

Project ๋ ˆ๋ฒจ Gradle๋กœ~~

Gradle ํŒŒ์ผ์— ์ž๊ธฐ์˜ ํ˜„์žฌ ์ฝ”ํ‹€๋ฆฐ ๋ฒ„์ „๊ณผ, classpath๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ๋œ๋‹ค!

buildscript {
    ext.kotlin_version = "1.5.0"
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.2.1"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

 

๋‹ค์‹œ ๋นŒ๋“œํ•ด๋ณด๋ฉด, ์˜ค๋ฅ˜๊ฐ€ ํ•ด๊ฒฐ๋  ๊ฒƒ์ด๋‹ค! ๐Ÿ‘๐Ÿ‘