Android Studio Internal IDE Error - android

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.

Related

Android Studio crashes on start with PluginException

I am not sure whether it worked buefore, but I updated to Android Studio 4.1 today and then tried launching it, only to see the crash below.
The crash happens even when I delete everything from %appdata%\Google\AndroidStudio4.1\plugins. It seems that the problem is with the JetBrains Android plugin itself?
Internal error. Please refer to https://code.google.com/p/android/issues
java.util.concurrent.CompletionException: com.intellij.diagnostic.PluginException: ComponentConfig{implementationClass='', interfaceClass='com.intellij.openapi.projectRoots.impl.DefaultJdkConfigurator', headlessImplementationClass='', loadForDefaultProject=false, options={overrides=true}} does not override anything [Plugin: org.jetbrains.android]
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:618)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:591)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1975)
at com.intellij.idea.ApplicationLoader$initApplication$2.accept(ApplicationLoader.kt:379)
at com.intellij.idea.ApplicationLoader$initApplication$2.accept(ApplicationLoader.kt)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1609)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.intellij.diagnostic.PluginException: ComponentConfig{implementationClass='', interfaceClass='com.intellij.openapi.projectRoots.impl.DefaultJdkConfigurator', headlessImplementationClass='', loadForDefaultProject=false, options={overrides=true}} does not override anything [Plugin: org.jetbrains.android]
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponent(ComponentManagerImpl.kt:291)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:194)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:157)
at com.intellij.idea.ApplicationLoader$registerAppComponents$1.apply(ApplicationLoader.kt:93)
at com.intellij.idea.ApplicationLoader$registerAppComponents$1.apply(ApplicationLoader.kt)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:616)
... 12 more
-----
JRE 1.8.0_242-release-1644-b01 amd64 by JetBrains s.r.o
C:\Program Files\Android\Android Studio\jre\jre
Any help would be appreciated.
Try to go from Android Studio's start menu to Settings-Plugins and just disable and enable again all needed plugins.
Thank you for your suggestions, but I ended up simply reinstalling Android Studio. It seems that I somehow had a botched installation.

Android Studio build error on NTFS partition

I'm having problems building apps on Android Studio. Things work fine when the project is on my ext4 partition, but when I created a new one on my NTFS, I encountered this:
Argument for #NotNull parameter 'message' of com/android/tools/idea/gradle/project/sync/GradleSyncState.syncFailed must not be null
java.lang.IllegalArgumentException: Argument for #NotNull parameter 'message' of com/android/tools/idea/gradle/project/sync/GradleSyncState.syncFailed must not be null
at com.android.tools.idea.gradle.project.sync.GradleSyncState.$$$reportNull$$$0(GradleSyncState.java)
at com.android.tools.idea.gradle.project.sync.GradleSyncState.syncFailed(GradleSyncState.java)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.doPopulateProject(IdeaSyncPopulateProjectTask.java:135)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.populate(IdeaSyncPopulateProjectTask.java:97)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.access$000(IdeaSyncPopulateProjectTask.java:39)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask$1.run(IdeaSyncPopulateProjectTask.java:86)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
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)
The error disappeared when I restarted Android Studio, but after that I still cannot run my app (the project structure in the sidebar is not displayed properly).
I'm using Android Studio 3.2 on Ubuntu 18.04.1.
I figured it out. (By mistake, to be honest...)
Let's say you have an NTFS partition mount at /mnt/ntfs, and your project is at /mnt/ntfs/projects/project.
Your home partition (ext4) is mounted at /home, your home directory is /home/user and you have a symbolic link at /home/user/projects that points to /mnt/ntfs/projects.
The reason I (and hopefully you too) have encountered this error is that when using Android Studio's "Open Project..." option, I provided the symbolic link (/home/user/projects/project). When trying to provide the real path (/mnt/ntfs/projects/project) the gradle sync succeeded.
So to fix this for now, simply provide the real path. However, this should probably be addressed by IntelliJ or the developers of Gradle.

Android Studio 3.2 sync failed after update

I updated from Android Studio 3.1.4 to 3.2. Now sync fails with the error message
Sync finish event has not been received
How can this be fixed? Invalidate Caches/Restart did not help.
The ida log shows the following warning:
java.lang.NoClassDefFoundError: org/gradle/wrapper/WrapperConfiguration
at org.jetbrains.plugins.gradle.util.GradleUtil.getWrapperConfiguration(GradleUtil.java:92)
at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getGradleHome(GradleInstallationManager.java:208)
at org.jetbrains.plugins.gradle.service.GradleInstallationManager.doGetGradleHome(GradleInstallationManager.java:194)
at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getGradleHome(GradleInstallationManager.java:129)
at org.jetbrains.plugins.gradle.GradleManager.lambda$getExecutionSettingsProvider$2(GradleManager.java:150)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getExecutionSettings(ExternalSystemApiUtil.java:732)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doCreateFacade(ExternalSystemFacadeManager.java:201)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doGetFacade(ExternalSystemFacadeManager.java:177)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:132)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:269)
at com.sun.proxy.$Proxy148.getResolver(Unknown Source)
at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:84)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:163)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:149)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:550)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$5.run(ExternalSystemUtil.java:647)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
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)
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.WrapperConfiguration PluginClassLoader[org.jetbrains.plugins.gradle, 181.5540.7.32.5014246] com.intellij.ide.plugins.cl.PluginClassLoader#5f6fe2bb
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
The only solution I found was to remove Android Studio and reinstall Android Studio 3.2 from scratch.
EDIT
The problem might be different from OP but this is also a new issue in AS 3.2 which gives you Gradle sync error
I had Gradle sync error for the last couple of days after I updated to AS 3.2 and in my case, the problem was one of my library modules contain the following in Manifest.xml
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="27" />
and the solution was to remove 'uses-sdk' (in AndroidManifest.xml file) in ALL the modules in your project.
Try to look into the log of the IDE, for my case it was a flutter plugin causing the issue..
You can navigate to the logs by clicking on show log in the gradle try again strip at the top.
or
go to
~/username/Library/Logs/AndroidStudio3.5/
and read the idea.log file.
java.lang.NoClassDefFoundError:
org/gradle/wrapper/WrapperConfiguration
It seems like WrapperConfiguration class couldn't be found. Try these commands:
brew install gradle
gradle wrapper
The second line will install wrapper class. And then,
gradlew clean

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

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)

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