Android Room cannot verify the data integrity

passยท2023๋…„ 2์›” 21์ผ
0

Android

๋ชฉ๋ก ๋ณด๊ธฐ
3/41

Room cannot verify the data integrity. Looks like you've changed schema but forgot to update the version number. You can simply fix this by increasing the version number.

๐Ÿค” Android์—์„œ Room DB๋ฅผ ์‚ฌ์šฉํ•˜๋‹ค ์œ„์™€ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜์˜€๋‹ค.

์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•œ ์ด์œ ๋Š” DB์˜ ๊ตฌ์กฐ๋ฅผ ๋ณ€๊ฒฝํ•˜์˜€๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.
DB์˜ ๊ตฌ์กฐ๋ฅผ ๋ณ€๊ฒฝํ•˜์—ฌ๋„ Android์—์„œ๋Š” ๊ตฌ๊ธ€ ๋“œ๋ผ์ด๋ธŒ์— ๋ฐ์ดํ„ฐ๋ฅผ ์ž๋™ ๋ฐฑ์—… ํ•ด๋‘๊ธฐ ๋•Œ๋ฌธ์— version์„ migrate ํ•˜์—ฌ์•ผ ํ•œ๋‹ค.

DB์˜ ๋‚ด์šฉ์ด ์ถฉ๋Œํ•œ๋‹ค๋Š” ์ด์•ผ๊ธฐ์ด๋ฏ€๋กœ, ์•ฑ์„ ์‚ญ์ œํ•œ ํ›„ manifest์—์„œ allowBackup=true ์†์„ฑ์„ ์—†์• ๊ณ , ๋‹ค์‹œ buildํ•˜์—ฌ ํ•ด๊ฒฐํ•˜์˜€๋‹ค.

profile
์•ˆ๋“œ๋กœ์ด๋“œ ๊ฐœ๋ฐœ์ž ์ง€๋ง์ƒ

0๊ฐœ์˜ ๋Œ“๊ธ€