0

While loading a layout file it doesn't appears, and it show a render problem error.

I have tried to refresh the layout and it shows the same error, i have tried to invalidate cache and restart option and it comes with the same error.

it show these on render problem



java.lang.NoClassDefFoundError: sun/misc/Cleaner
at libcore.util.NativeAllocationRegistry.registerNativeAllocation_Original(NativeAllocationRegistry.java:130)
at libcore.util.NativeAllocationRegistry_Delegate.registerNativeAllocation(NativeAllocationRegistry_Delegate.java:66)
at libcore.util.NativeAllocationRegistry.registerNativeAllocation(NativeAllocationRegistry.java:119)
at android.os.Binder.<init>(Binder.java:404)
at com.android.internal.view.IInputMethodClient$Stub.<init>(IInputMethodClient.java:18)
at android.view.inputmethod.InputMethodManager$1.<init>(InputMethodManager.java:606)
at android.view.inputmethod.InputMethodManager.<init>(InputMethodManager.java:606)
at android.view.inputmethod.InputMethodManager_Delegate.getInstance(InputMethodManager_Delegate.java:43)
at android.view.inputmethod.InputMethodManager.getInstance(InputMethodManager.java:681)
at com.android.layoutlib.bridge.impl.RenderAction.setUp(RenderAction.java:245)
at com.android.layoutlib.bridge.impl.RenderAction.init(RenderAction.java:133)

i am expecting the layout to visible clearly, i have run the same project with android studio and its working fine, but again i'm facing the same render problem with Intellij-Idea IDE.

  • are you using Java 9 ? https://stackoverflow.com/questions/46476085/java-lang-classnotfoundexception-sun-misc-cleaner – Maelig Jul 30 '19 at 07:41
  • using Java 1.8 and getting the same render problem. **`technically i'm using JAVA 1.8.0_74 as Project SDK`** – Ashish Bhuyan Jul 30 '19 at 07:50
  • Sorry I don't find anything about it, are you sure that your project is configured with Java 8 in Intellij Idea ? – Maelig Jul 30 '19 at 07:53
  • Why are you using IDEA and not Android Studio ? – Maelig Jul 30 '19 at 07:55
  • check my answer, there is an issue in IDEA 2019 – Maelig Jul 30 '19 at 07:57
  • Why are you using Intellij-Idea IDE? – Zun Jul 30 '19 at 08:07
  • @Maelig That android project in working with android studio fine. i am working in several projects like a Java (Spring) Project, a JSP Project and working with some JavaScripts and the Android Project, that's why i prefer one IDE for everything so. i'm just facing the issue with android Layout Preview only and everything else is working fine. – Ashish Bhuyan Jul 30 '19 at 09:15
  • @AshishBhuyan I answered below, there is an open issue, you can accept the answer because you have no workaround right now except using Android Studio until it's fixed ;) – Maelig Jul 30 '19 at 09:51

2 Answers2

0

After wasting 3 hr this help me

Uninstall complete java from Computer and install java 8 again

Dheeraj Jaiswal
  • 364
  • 3
  • 6