Eclipse error : The project was not built due to "Could not read from source when writing file πŸŒ’

2021-09-03

Eclipse error : The project was not built due to "Could not read from source when writing file πŸŒ’

Eclipse error : The project was not built due to "Could not read from source when writing file πŸŒ’ μ˜€λžœλ§Œμ— 기쑴의 ν”„λ‘œμ νŠΈλ₯Ό λΉŒλ“œν•˜λ €κ³  ν–ˆλ”λ‹ˆ "The project was not built due to" μ—λŸ¬κ°€ λ°œμƒν•œλ‹€. ν•΄κ²° 방법은 λ‹€μŒκ³Ό κ°™λ‹€. Project clean Ecli

Eclipse error : The project was not built due to "Could not read from source when writing file πŸŒ’

μ˜€λžœλ§Œμ— 기쑴의 ν”„λ‘œμ νŠΈλ₯Ό λΉŒλ“œν•˜λ €κ³  ν–ˆλ”λ‹ˆ "The project was not built due to" μ—λŸ¬κ°€ λ°œμƒν•œλ‹€.

이 μ—λŸ¬λŠ” Eclipseκ°€ μ†ŒμŠ€ νŒŒμΌμ„ μ½μ–΄μ„œ .class 파일둜 μ»΄νŒŒμΌν•˜λŠ” κ³Όμ •μ—μ„œ μ‹€νŒ¨ν–ˆμ„ λ•Œ λ‚˜νƒ€λ‚œλ‹€. μ£Όμš” 원인은 μ„Έ κ°€μ§€ 정도인데:

  1. λΉŒλ“œ μΊμ‹œκ°€ 꼬인 경우 (κ°€μž₯ 흔함)
  2. 파일 μ‹œμŠ€ν…œ μ ‘κ·Ό κΆŒν•œ 문제
  3. ν”„λ‘œμ νŠΈ workspace 섀정이 μ†μƒλœ 경우

ν•΄κ²° 방법은 λ‹€μŒκ³Ό κ°™λ‹€.

Project clean

Eclipse의 λΉŒλ“œ κ²°κ³Όλ¬Ό(bin/ λ˜λŠ” build/ 폴더)을 μ „λΆ€ 날리고 λ‹€μ‹œ λΉŒλ“œν•˜λŠ” 방법이닀.

  • Eclipse IDE μƒλ‹¨μ˜ "Project" λ²„νŠΌ 클릭 ν›„ "Clean" λ²„νŠΌ 클릭

  • Errorκ°€ λ°œμƒν•œ ν”„λ‘œμ νŠΈ 선택 ν›„ "Clean" λ²„νŠΌ 클릭

보톡은 ν•΄λ‹Ή λ°©λ²•μœΌλ‘œ 해결이 λ˜μ§€λ§Œ ν•„μžμ²˜λŸΌ μ•ˆλ˜λŠ” κ²½μš°λ„ μžˆλ‹€. 그럴 λ•ŒλŠ” μ•„λž˜ μˆœμ„œλ‘œ μΆ”κ°€ μ‹œλ„ν•΄λ³΄μž.

  1. Eclipse μž¬μ‹œμž‘ β€” JVM μΊμ‹œκ°€ 문제인 경우 해결됨
  2. PC μž¬λΆ€νŒ… β€” 파일 잠금(lock) λ¬Έμ œκ°€ 원인일 λ•Œ 유효
  3. .metadata 폴더 μ‚­μ œ β€” workspace 섀정이 μ™„μ „νžˆ μ†μƒλœ 경우. 단, 이 방법은 Eclipse 섀정이 μ΄ˆκΈ°ν™”λ˜λ―€λ‘œ λ§ˆμ§€λ§‰ μˆ˜λ‹¨μœΌλ‘œ μ“°μž