-
[AOS] Build was configured to prefer settings repositories over project repositories but repository 'flatDir' was added by build file 'build.gradle'2023. 4. 27. 18:00๋ฐ์ํ
๐ชฒ
A problem occurred evaluating root project ' '.
Build was configured to prefer settings repositories over project repositories but repository 'flatDir' was added by build file
๋์ผํ ํ์ฅ์๋ฅผ ๊ฐ์ง ๋ชจ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ implement ํ๊ธฐ ์ํด flatDir์ ์ฌ์ฉํ์ ๋ ๋ฐ์ํ๋ค.
ํด๊ฒฐ ๋ฐฉ๋ฒ
ํด๋น ๊ฒ์๋ฌผ๊ณผ ๋์ผํ ์์ธ์ผ๋ก, Arctic Fox ๋ฒ์ ์ดํ ์์ฑ๋ ํ๋ก์ ํธ๋ build.gradle์ด ์๋ settings.gradle์ ์์ฑํด์ผ ํ๊ธฐ ๋๋ฌธ์ด๋ค.
๋ฐฉ๋ฒ 1
์ ๊ฒ์๋ฌผ๊ณผ ๋์ผํ ๋ฐฉ๋ฒ์ ์ฌ์ฉํ๋ค.
์ฆ, build.gradle์ flatDir์ ์ ์ํ ๋ถ๋ถ์ settings.gradle๋ก ์ฎ๊ธฐ๋ ๊ฒ์ด๋ค.
[ build.gradle (App) ]
repositories { flatDir { dirs 'libs' } }
๐๐ป
[ settings.gradle ]
repositories { ... flatDir { dirs 'libs' } }
๋ฐฉ๋ฒ 2
build.gradle์ ์ ์ํ flatDir ์ฝ๋๋ฅผ ์ ๊ฑฐ ํ ์๋์ ๊ฐ์ด implementation ๋์ด์๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ํ๋์ฉ implementation ํ๋๋ก ๋ณ๊ฒฝํ๋ค.
[ build.gradle (App) ]
implementation fileTree(include: ['*.aar'], dir: 'libs')
๐๐ป
[ build.gradle (App) ]
implementation files('libs/importํ -๋ผ์ด๋ธ๋ฌ๋ฆฌ-๋ช .aar')
๋ฐ์ํ'๐ฐ Android ๐ญ > ๐ชฒ ๋๋ฒ๊น ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ