[Kotlin] No cached version of xxx available for offline mode

๐Ÿ™„ ์ง๋ฉดํ•œ ์—๋Ÿฌ..

ํ•œ ํ”„๋กœ์ ํŠธ์—์„œ ๋‘ ๋ช…์ด ํ˜‘์—…ํ•˜๋Š” ์ƒํ™ฉ์ด๋‹ค.
๋‚˜๋Š” A ๋ถ€๋ถ„์„ ์ˆ˜์ •ํ•˜์˜€๊ณ , ํŒ€์›์€ B ๋ถ€๋ถ„์„ ์ˆ˜์ •ํ•˜์˜€๋‹ค.
๊ฐ์ž์˜ ์ˆ˜์ • ๋ถ€๋ถ„์„ merge ํ›„ A์™€ B๋ถ€๋ถ„์ด ํ•ฉ์ณ์ง„ code๋ฅผ ์‹คํ–‰ํ–ˆ์„ ๋•Œ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒผ๋‹ค.

Build Error: No cached version of androidx.paging:paging-runtime:3.1.1 available for offline mode.

์—๋Ÿฌ๊ฐ€ ์—„์ฒญ ๋งŽ์ด ๋–ด์—ˆ๊ณ , ๋‚ด๊ฐ€ ๋‹ด๋‹นํ•œ ๋ถ€๋ถ„์ด ์•„๋‹ˆ์—ˆ๋‹ค.
๋ถ„๋ช… ํŒ€์›์˜ ํ™˜๊ฒฝ์—์„  ์ž˜ ๋Œ์•„๊ฐ€๋˜ ์ฝ”๋“œ๊ฐ€ ๋‚ด ์ฝ”๋“œ์—์„œ ์ž‘๋™์„ ํ•˜์ง€ ์•Š์•„ ๋‹นํ™ฉํ–ˆ๋‹ค.


๐Ÿ˜Ž ํ•ด๊ฒฐ ๊ณผ์ •

์ฒ˜์Œ์—” gradle version ๋•Œ๋ฌธ์ธ๊ฐ€? ํ•ด์„œ version์„ ๋‚ฎ์ถฐ๋ณด๊ธฐ๋„ ์—†์• ๋ณด๊ธฐ๋„ ํ–ˆ๋‹ค.
์ด๊ฒƒ์ €๊ฒƒ ์‚ฝ์งˆ 30๋ถ„ ์ •๋„ ํ•˜๋‹ค๊ฐ€ ํ‡ด๊ทผ.

ํ‡ด๊ทผ ํ›„, ์ง‘์—์„œ ๋‹ค์‹œ ์ฒœ์ฒœํžˆ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋ฅผ ์ฝ์—ˆ๋‹ค.
๊ทธ๋Ÿฌ๋‹ค๊ฐ€ offline mode ๋ผ๋Š” ๋ถ€๋ถ„์„ ํ™•์ธํ–ˆ๋‹ค.

gradle์ชฝ์— ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ๋˜ ๋ถ€๋ถ„์€ ๋งž์•˜๊ณ , gradle build๋ฅผ offline mode๋กœ ํ—ˆ์šฉํ•˜์ง€ ์•Š์•„ ์ƒ๊ธด ๋ฌธ์ œ์˜€๋‹ค.

๋‚˜๋Š” ์‹ค์ œ ๊ธฐ๊ธฐ๋ฅผ USB ๋””๋ฒ„๊น…ํ•ด์„œ ํ…Œ์ŠคํŠธํ•˜์˜€๋Š”๋ฐ, ์ด ๋•Œ gradle์˜ offline ์„ค์ •์ด ํ•„์š”ํ•œ๊ฐ€๋ณด๋‹ค.(ํ‹€๋ฆฌ๋‹ค๋ฉด ์•Œ๋ ค์ฃผ์„ธ์š”!)
์ด์ œ ์•„๋ž˜์—์„œ ํ•ด๊ฒฐ ๊ณผ์ •์„ ์ •๋ฆฌํ•ด๋ณด๊ฒ ๋‹ค.

์›์ธ : ํ˜‘์—…์„ ํ•˜๋ฉฐ gradle์ด ๋ณ€๊ฒฝ๋˜์—ˆ์„ ๋•Œ ์ผ์–ด๋‚œ ์—๋Ÿฌ.
๋ณ€๊ฒฝ๋œ gradle์— build ์„ค์ •์ด ๋ฌธ์ œ์˜€๋‹ค.

ํ•ด๊ฒฐ : gradle build mode ๋ณ€๊ฒฝ (Toggle offline mode ๋ฒ„ํŠผ ์ด์šฉ)
1. ์•„๋ž˜์˜ ๊ทธ๋ฆผ์—์„œ Gradle์„ ํด๋ฆญ
2. ์•„๋ž˜์˜ ๊ทธ๋ฆผ 2๋ฒˆ ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ๊ทธ๋ฆผ์˜ highlight ํšจ๊ณผ ์ œ๊ฑฐ

sovled

์ด๋ ‡๊ฒŒ ํ•˜๊ณ  ๋‚œ ๋’ค, ๋‹ค์‹œ buildํ•ด๋ณด๋ฉด ์•ฑ์ด ์ž˜ ์ž‘๋™ํ•˜๋Š” ๋ชจ์Šต์„ ๋ณผ ์ˆ˜ ์žˆ์„ ๊ฒƒ์ด๋‹ค!

Leave a comment