Rendering Problems: Unable to find the layout for Action Bar solved - android

i found solution ,and i replace new 2.3.3 as ,and use 1.0.2
all of the question render problem solved!!!
Cause the problem that IDE AS 1.0.2 use actionbar !
But as2 etc looks like OLD ACTIONBAR DEPRECIATED!
I am making an Android app and trying to use an ActionBar.
I am getting the following error in the log:
UnsupportedMethodException
Unsupported method: AndroidProject.getPluginGeneration().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
And this error for the layout:
Rendering Problems Unable to find the layout for Action Bar.
Consider updating to a more recent version of appcompat, or switch the
rendering library in the IDE down to API 21 (Details) Tip: Try to
refresh the layout.
When I tried reducing the SDK version to 20 or 21 it did not help.
Has anyone been able to solve this?
The details about action bar? I guess it is ,but I am not sure?
 Rendering Problems (Details)
java.lang.RuntimeException: Unable to find the layout for Action Bar.
at com.android.layoutlib.bridge.bars.BridgeActionBar.<init>(BridgeActionBar.java:57)
at com.android.layoutlib.bridge.bars.AppCompatActionBar.<init>(AppCompatActionBar.java:59)
at com.android.layoutlib.bridge.impl.Layout.createActionBar(Layout.java:238)
at com.android.layoutlib.bridge.impl.Layout.<init>(Layout.java:150)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:301)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$70(RenderTask.java:659)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Related

How to fix "Render problem", "java.lang.NoClassDefFoundError: sun/misc/Cleaner" in IntelliJ IDEA?

I'm following Kotlin Application for Android development by Google on Udacity (code here: https://github.com/udacity/andfun-kotlin-guess-it/ ), and IntelliJ shows a "Render problem" error whenever I try to access Design view of any fragment.xml file and doesnt show any layout elements (just a blank and blue screen). It also shows me this error:
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)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.init(RenderSessionImpl.java:163)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:383)
at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:193)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:511)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$4(RenderTask.java:640)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: sun.misc.Cleaner PluginClassLoader[org.jetbrains.android, 10.3.3] com.intellij.ide.plugins.cl.PluginClassLoader#25058ce2
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:75)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 22 more
I already tried Invalidating Caches and restarting the application, Clean project, Re-syncing Gradle and changing different settings in Design View, such as API Level and App Theme.
I'm working with Android API 28 and Java version 1.8
I would like to be able to work with Design View tab and make the error go away.
There should be a fix in the new version of Intellij IDEA
See https://youtrack.jetbrains.com/issue/IDEA-219113#focus=streamItem-27-3621529.0-0
Post of Dmitry Jemerov
BR Wolfgang

unable to see views in design tab in intellij idea

Recently I installed new version of intellij idea and i tried to update classpath (in build.gradle :application) to
'com.android.tools.build:gradle:3.4.2'
after that i can't see or edit any views in design tab. text tab is working completely but design in not working.
unfortunately i cant upload image because of reputation.
but know that the page is only showing me a blanked screen of phone.
I tried to return classpath to version 3.4.0 but that did not worked too.
I changed style from
Theme.AppCompat.Light.DarkActionBar
to
Base.Theme.AppCompat.Light.DarkActionBar .
that didn't worked too.
I received this message in Render problem from warnings and errors tab:
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)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.init(RenderSessionImpl.java:163)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:383)
at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:193)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:511)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$4(RenderTask.java:640)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: sun.misc.Cleaner PluginClassLoader[org.jetbrains.android, 10.3.3] com.intellij.ide.plugins.cl.PluginClassLoader#b45afd8
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:75)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 22 more
please help me
It's a known issue that will be fixed in 2019.2.2 version. Right now you can use Android Studio or the previous IntelliJ IDEA release.
they actually tried to fix this issue in IntelliJ IDEA 2019.2.1 and somehow they did.
but jetbrains technicians made another issue.same error but this time attributes tab can't be loaded.
for now best new version we can use is 2019.2 jbr8

Android Studio Rendering Problems without message

I'm an Android Studio user who has recently experienced the Rendering Problem...
Usually when there is a rendering problem, all cases that I searched have messages - type missing, known bug, etc.
However, there was no error message for my case, and it just says, "Rendering Problems."
I tried many things like:
Converting API Versions
Rebuild / Refresh
Invalidating Cashe
SDK Version Update
Remaking the XML files
Restarting the project / Rebooting
And plenty of not useful solutions
And the following detail is shown below:
java.lang.NullPointerException
at android.graphics.Paint_Delegate.reset(Paint_Delegate.java:1238)
at android.graphics.Paint_Delegate.<init>(Paint_Delegate.java:1179)
at android.graphics.Paint_Delegate.nInit(Paint_Delegate.java:675)
at android.graphics.Paint.nInit(Paint.java)
at android.graphics.Paint.<init>(Paint.java:457)
at android.graphics.drawable.ColorDrawable.<init>(ColorDrawable.java:47)
at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:357)
at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:262)
at com.android.layoutlib.bridge.impl.Layout.<init>(Layout.java:125)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:301)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548)
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$70(RenderTask.java:659)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Android Studio Internal IDE Error

I am having an internal IDE error in my android studio. The component properties panel never shows anything. And when I click on a component, there's an error in the event log which says:
IllegalArgumentException: Missing attribute definition for focusable
This is the error details.
Missing attribute definition for focusable
java.lang.IllegalArgumentException: Missing attribute definition for focusable
at com.android.tools.idea.uibuilder.property.NlPropertyItem.<init>(NlPropertyItem.java:88)
at com.android.tools.idea.uibuilder.property.NlPropertyItem.create(NlPropertyItem.java:72)
at com.android.tools.idea.uibuilder.property.NlProperties.getPropertiesWithReadLock(NlProperties.java:111)
at com.android.tools.idea.uibuilder.property.NlProperties.lambda$getProperties$538(NlProperties.java:64)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)
at com.android.tools.idea.uibuilder.property.NlProperties.getProperties(NlProperties.java:63)
at com.android.tools.idea.uibuilder.property.NlPropertiesManager.lambda$setSelectedComponents$202(NlPropertiesManager.java:174)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
My AS IDE is updated (version 2.2.2), I'm also using Oracle JDK (jdk1.8.0_112).
change the compileSdkVersion and targetSdkVersion from 24 to 23, I think it will help you...
It might be the problem with OpenJDK. Please remove it and install Oracle JDK instead using this post: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
Then go to File -> Project Structure and change Java SDK path.
Might it will help you. happy coding.

Android studio 2.2 preview 5 design editor/preview seem to be broken?

After updating from Android studio 2.2 preview 4 to 5, Design and Preview tabs stopped to show previews.
They don't show anything, only the error (described below) and a tip "Try to refresh the layout".
Refreshing and choosing different options in a top bar (API, device orientation) doesn't help.
Was trying File -> Invalidate Caches/Restart. Doesn't help either.
Any suggestions?
java.nio.file.InvalidPathException: Illegal char <:> at index 8: #android:drawable/ic_menu_send
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at com.android.ide.common.res2.ResourceItem.parseFileName(ResourceItem.java:585)
at com.android.ide.common.res2.ResourceItem.parseXmlToResourceValue(ResourceItem.java:405)
at com.android.ide.common.res2.ResourceItem.getResourceValue(ResourceItem.java:240)
at com.android.ide.common.res2.AbstractResourceRepository.getConfiguredResources(AbstractResourceRepository.java:393)
at com.android.ide.common.res2.AbstractResourceRepository.getConfiguredResources(AbstractResourceRepository.java:349)
at com.android.tools.idea.configurations.ResourceResolverCache$1.compute(ResourceResolverCache.java:166)
at com.android.tools.idea.configurations.ResourceResolverCache$1.compute(ResourceResolverCache.java:163)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)
at com.android.tools.idea.configurations.ResourceResolverCache.getResourceResolver(ResourceResolverCache.java:163)
at com.android.tools.idea.configurations.Configuration.getResourceResolver(Configuration.java:1212)
at com.android.tools.idea.rendering.RenderTask.getResourceResolver(RenderTask.java:198)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:425)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$52(RenderTask.java:659)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
UPD1: Seem to be an issue.
In your activity.xml file there must be a line as xmlns:app="". Delete it.
There is an error in xml file check that no
android: or xmlns:app=""
Fixed in Android studio 2.2 (Canary) Preview 6 (also see issue).

Categories

Resources