How to Fix “Unsafe cannot be resolved to a type” in
- 时间:2020-10-12 15:56:23
- 分类:网络文摘
- 阅读:191 次
If you have the following two errors building your Java projects using Eclipse,
- Unsafe cannot be resolved to a type
- The import sun.misc.Unsafe cannot be resolved
Then, this turns out to be the fix for me.

The import sun.misc.Unsafe cannot be resolved
Navigate to the project and Select Project – Preferences – Java Compiler – Enable project specific settings – Compiler compliance level = 11 – Use default compliance settings (Ticked)

eclipse-project-properties-java-compiler-enable-project-specific-settings
Apply and Close – then do a full clean rebuild, which will make the errors go away!
–EOF (The Ultimate Computing & Technology Blog) —
推荐阅读:Depth First Search Algorithm to Compute the Smallest String Star Algorithm to Check if All Points are On the Same Line Prefix Sum Algorithm to Count Number of Nice Subarrays How to Append Another List to a Existing List in Python? (Differ Linear Algorithm to Check If All 1’s Are at Least Length K Finding the Root of a Tree (Finding the Common Destination) Does WIFI Extender Boost Wireless Signal? How to Fix Slow WIFI? Bruteforce with Memoization to Count the Square Digit Chains How to Merge Two List/Iterators in Java? How to Design a First Unique Number Class with O(1)?
- 评论列表
-
- 添加评论