๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ“ฑ| Android/โœ… | ์—๋Ÿฌํ•ด๊ฒฐ

Plugin [id: 'dagger.hilt.android.plugin'] was not found in any of the following sources

by immgga 2022. 4. 18.

์ด๋ฒˆ ์˜ค๋ฅ˜๋Š” dagger hilt๋ฅผ ์“ฐ๋Š” ์‚ฌ๋žŒ๋“ค์—๊ฒŒ ๋‚˜ํƒ€๋‚ ์ˆ˜ ์žˆ๋Š” ์˜ค๋ฅ˜์ด๋‹ค

 

์˜ค๋ฅ˜ ๋ฌธ๊ตฌ

* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'dagger.hilt.android.plugin'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult ...

 

 

์˜ค๋ฅ˜ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

 

settings.gradle์— ๋“ค์–ด๊ฐ„ ๋‹ค์Œ,

๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ฝ”๋“œ๋ฅผ ์จ์ค€๋‹ค.

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
    }
    resolutionStrategy {
        eachPlugin {
            if( requested.id.id == 'dagger.hilt.android.plugin') {
                useModule("com.google.dagger:hilt-android-gradle-plugin:2.39.1")
            }
        }
    }
}

๋‚˜์˜ ๊ฒฝ์šฐ์—๋Š” ์ด๋ ‡๊ฒŒ ํ•ด๊ฒฐํ–ˆ๋‹ค.

728x90