Android Studio 3.0 Kotlin not working properly - android

I have recently installed Android Studio 3.0 and started a new project using Kotlin. The kotlin plugin with highlighting and code completion have been working fine since I started the project. However, a couple of days ago I closed Android Studio for the first time since I started this project, and now when I reopened it, code completion and highlighting have stopped working and Android Studio shows me the following exception:
2017-11-05 19:38:03,424 [ thread 19] ERROR - on.CompletionProgressIndicator - Resolver for 'completion/highlighting in org.jetbrains.kotlin.idea.caches.resolve.NotUnderContentRootModuleInfo#3a2816ac for files GameMainActivity.kt for platform JVM' does not know how to resolve ModuleProductionSourceInfo(module=Module: 'app')
java.lang.AssertionError: Resolver for 'completion/highlighting in org.jetbrains.kotlin.idea.caches.resolve.NotUnderContentRootModuleInfo#3a2816ac for files GameMainActivity.kt for platform JVM' does not know how to resolve ModuleProductionSourceInfo(module=Module: 'app')
at org.jetbrains.kotlin.analyzer.ResolverForProjectImpl.descriptorForModule(AnalyzerFacade.kt:168)
at org.jetbrains.kotlin.analyzer.ResolverForProjectImpl.descriptorForModule(AnalyzerFacade.kt:77)
at org.jetbrains.kotlin.analyzer.ResolverForProject.resolverForModule(AnalyzerFacade.kt:56)
at org.jetbrains.kotlin.idea.caches.resolve.ProjectResolutionFacade.resolverForModuleInfo(ProjectResolutionFacade.kt:73)
at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeImpl.tryGetFrontendService(ResolutionFacadeImpl.kt:87)
at org.jetbrains.kotlin.idea.caches.resolve.JavaResolutionUtils.getJavaDescriptorResolver(JavaResolveExtension.kt:109)
at org.jetbrains.kotlin.idea.caches.resolve.JavaResolutionUtils.getJavaClassDescriptor(JavaResolveExtension.kt:55)
at org.jetbrains.kotlin.idea.caches.resolve.JavaResolutionUtils.resolveToDescriptor(JavaResolveExtension.kt:103)
at org.jetbrains.kotlin.idea.caches.resolve.JavaResolutionUtils.resolveToDescriptor$default(JavaResolveExtension.kt:95)
at org.jetbrains.kotlin.idea.completion.BasicCompletionSession$ALL$1$completeNonImported$6.invoke(BasicCompletionSession.kt:379)
at org.jetbrains.kotlin.idea.completion.BasicCompletionSession$ALL$1$completeNonImported$6.invoke(BasicCompletionSession.kt:182)
at org.jetbrains.kotlin.idea.completion.AllClassesCompletion$addAdaptedJavaCompletion$1.consume(AllClassesCompletion.kt:100)
at org.jetbrains.kotlin.idea.completion.AllClassesCompletion$addAdaptedJavaCompletion$1.consume(AllClassesCompletion.kt:41)
at com.intellij.codeInsight.completion.LimitedAccessibleClassPreprocessor.process(LimitedAccessibleClassPreprocessor.java:80)
at com.intellij.codeInsight.completion.LimitedAccessibleClassPreprocessor.process(LimitedAccessibleClassPreprocessor.java:32)
at com.intellij.psi.impl.search.AllClassesSearchExecutor.processClassesByNames(AllClassesSearchExecutor.java:84)
at com.intellij.codeInsight.completion.AllClassesGetter.processJavaClasses(AllClassesGetter.java:157)
at com.intellij.codeInsight.completion.AllClassesGetter.processJavaClasses(AllClassesGetter.java:143)
at org.jetbrains.kotlin.idea.completion.AllClassesCompletion.addAdaptedJavaCompletion(AllClassesCompletion.kt:89)
at org.jetbrains.kotlin.idea.completion.AllClassesCompletion.collect(AllClassesCompletion.kt:72)
at org.jetbrains.kotlin.idea.completion.BasicCompletionSession$ALL$1.completeNonImported(BasicCompletionSession.kt:379)
at org.jetbrains.kotlin.idea.completion.BasicCompletionSession$ALL$1.access$completeNonImported(BasicCompletionSession.kt:182)
at org.jetbrains.kotlin.idea.completion.BasicCompletionSession$ALL$1$doComplete$4.invoke(BasicCompletionSession.kt:304)
at org.jetbrains.kotlin.idea.completion.BasicCompletionSession$ALL$1$doComplete$4.invoke(BasicCompletionSession.kt:182)
at org.jetbrains.kotlin.idea.completion.CompletionSession.withContextVariablesProvider(CompletionSession.kt:385)
at org.jetbrains.kotlin.idea.completion.BasicCompletionSession$ALL$1.doComplete(BasicCompletionSession.kt:274)
at org.jetbrains.kotlin.idea.completion.BasicCompletionSession.doComplete(BasicCompletionSession.kt:154)
at org.jetbrains.kotlin.idea.completion.CompletionSession._complete(CompletionSession.kt:233)
at org.jetbrains.kotlin.idea.completion.CompletionSession.complete(CompletionSession.kt:208)
at org.jetbrains.kotlin.idea.completion.KotlinCompletionContributor.doComplete(KotlinCompletionContributor.kt:301)
at org.jetbrains.kotlin.idea.completion.KotlinCompletionContributor.doComplete$default(KotlinCompletionContributor.kt:262)
at org.jetbrains.kotlin.idea.completion.KotlinCompletionContributor.performCompletion(KotlinCompletionContributor.kt:255)
at org.jetbrains.kotlin.idea.completion.KotlinCompletionContributor.access$performCompletion(KotlinCompletionContributor.kt:47)
at org.jetbrains.kotlin.idea.completion.KotlinCompletionContributor$provider$1.addCompletions(KotlinCompletionContributor.kt:58)
at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:151)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:138)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:131)
at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$2.addCompletions(LiveTemplateCompletionContributor.java:88)
at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:151)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:110)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:831)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.access$600(CompletionProgressIndicator.java:93)
at com.intellij.codeInsight.completion.CompletionProgressIndicator$1CalculateItems.run(CompletionProgressIndicator.java:813)
at com.intellij.codeInsight.completion.AsyncCompletion.lambda$null$0(CompletionThreading.java:108)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:931)
at com.intellij.codeInsight.completion.AsyncCompletion.lambda$null$1(CompletionThreading.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:176)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:556)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$2(CompletionThreading.java:103)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
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)
2017-11-05 19:38:03,425 [ thread 19] ERROR - on.CompletionProgressIndicator - Android Studio 3.0 Build #AI-171.4408382
2017-11-05 19:38:03,425 [ thread 19] ERROR - on.CompletionProgressIndicator - JDK: 1.8.0_152-release
2017-11-05 19:38:03,425 [ thread 19] ERROR - on.CompletionProgressIndicator - VM: OpenJDK 64-Bit Server VM
2017-11-05 19:38:03,425 [ thread 19] ERROR - on.CompletionProgressIndicator - Vendor: JetBrains s.r.o
2017-11-05 19:38:03,425 [ thread 19] ERROR - on.CompletionProgressIndicator - OS: Mac OS X
2017-11-05 19:38:03,425 [ thread 19] ERROR - on.CompletionProgressIndicator - Last Action: EditorBackSpace
2017-11-05 19:38:04,922 [ thread 19] ERROR - on.CompletionProgressIndicator - Resolver for 'completion/highlighting in org.jetbrains.kotlin.idea.caches.resolve.NotUnderContentRootModuleInfo#3a2816ac for files GameMainActivity.kt for platform JVM' does not know how to resolve ModuleProductionSourceInfo(module=Module: 'app')
I have raised a bug already which seems has been sent to JetBrains from within Android Studio, however I wonder if anyone else has gone through this and has found a workaround that I can try on my end to get over this bug momentarily until it is resolved by JetBrains.

This bug you are reporting has been resolved almost a year ago and it was affecting an old version of the Kotlin plugin: https://youtrack.jetbrains.com/issue/KT-12264
Try invalidating the AS cache and restarting it (File -> Invalidate Caches / Restart -> Invalidate Caches and Restart).

The issue happened because I renamed app/src/main/java to app/src/main/kotlin (since Android Studio doesn't do this itself even though the project was setup to include kotlin support from scratch) and the latter was not marked as a source folder. Once it was marked as a source folder, the issue resolved immediately.

Related

Installing an app from Android Studio has timed out

Since we migrated to modules we started experiencing a time out when installing the application for the second time. It only happens if we run the app for the second time. If we clear the project (Build->Clean Project) it launches ok, but the next time we try to run, it times out.
I have looked at the Android Studio logs and found an error that is thrown when launching the app but I am not sure what could go wrong and how to interpret these logs. Here is the snapshot of the logs:
2021-01-19 12:26:15,790 [413000061] INFO - ools.idea.run.tasks.DeployTask - Installing application: *****
2021-01-19 12:26:15,792 [413000063] ERROR - intellij.openapi.progress.Task - entry
java.lang.NullPointerException: entry
at java.util.zip.ZipFile.getInputStream(ZipFile.java:361)
at com.android.tools.deployer.ApkParser.getApkDetails(ApkParser.java:88)
at com.android.tools.deployer.ApkParser.parse(ApkParser.java:107)
at com.android.tools.deployer.ApkParser.parsePaths(ApkParser.java:76)
at com.android.tools.deployer.ApkInstaller.deltaInstall(ApkInstaller.java:244)
at com.android.tools.deployer.ApkInstaller.install(ApkInstaller.java:91)
at com.android.tools.deployer.Deployer.install(Deployer.java:145)
at com.android.tools.idea.run.tasks.DeployTask.perform(DeployTask.java:119)
at com.android.tools.idea.run.tasks.AbstractDeployTask.run(AbstractDeployTask.java:119)
at com.android.tools.idea.run.LaunchTaskRunner.run(LaunchTaskRunner.java:191)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:932)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:434)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$null$3(ProgressRunner.java:233)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:166)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:627)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:572)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:153)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:233)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
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)
2021-01-19 12:26:15,798 [413000069] ERROR - intellij.openapi.progress.Task - Android Studio 4.1.1 Build #AI-201.8743.12.41.6953283
2021-01-19 12:26:15,799 [413000070] ERROR - intellij.openapi.progress.Task - JDK: 1.8.0_242-release; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2021-01-19 12:26:15,799 [413000070] ERROR - intellij.openapi.progress.Task - OS: Windows 10
2021-01-19 12:26:15,799 [413000070] ERROR - intellij.openapi.progress.Task - Last Action: Run
2021-01-19 12:26:46,303 [413030574] INFO - j.ide.actions.RevealFileAction - Exit code 1
Please, help.
The issue was related to different versions of Android Studio and Android Gradle Plugin. When I had updated the Android Gradle Plugin version to the last available version the issue was gone. For more info see the posted issue in issue tracker.

Cause: invalid type code: 1C for android studio gradle [duplicate]

This question already has answers here:
How can I fix this error in Android Studio: "Cause: invalid type code: 00"?
(6 answers)
Closed 2 months ago.
My Android studio working fine but after update the plugin I am getting below error. I tried updating the JDK and reinstall the Android Studio but still facing the same error.
This is sync tab error.
Cause: invalid type code: 1C
This is the build tab error
020-06-04 19:13:09,207 [1650474] ERROR - nsions.impl.ExtensionPointImpl - Android Studio 4.0 Build #AI-193.6911.18.40.6514223
2020-06-04 19:13:09,207 [1650474] ERROR - nsions.impl.ExtensionPointImpl - JDK: 1.8.0_242-release; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2020-06-04 19:13:09,207 [1650474] ERROR - nsions.impl.ExtensionPointImpl - OS: Windows 10
2020-06-04 19:13:09,207 [1650474] ERROR - nsions.impl.ExtensionPointImpl - Plugin to blame: CSV Plugin version: 2.11.1
2020-06-04 19:13:09,208 [1650475] ERROR - nsions.impl.ExtensionPointImpl - While loading class net.seesharpsoft.intellij.plugins.csv.CsvFileTypeOverrider: net/seesharpsoft/intellij/plugins/csv/CsvFileTypeOverrider has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 [Plugin: net.seesharpsoft.intellij.plugins.csv]
com.intellij.diagnostic.PluginException: While loading class net.seesharpsoft.intellij.plugins.csv.CsvFileTypeOverrider: net/seesharpsoft/intellij/plugins/csv/CsvFileTypeOverrider has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 [Plugin: net.seesharpsoft.intellij.plugins.csv]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:223)
at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:167)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:75)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.openapi.extensions.impl.ExtensionComponentAdapter.getImplementationClass(ExtensionComponentAdapter.java:80)
at com.intellij.openapi.extensions.impl.ExtensionComponentAdapter.createInstance(ExtensionComponentAdapter.java:39)
at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.createInstance(XmlExtensionAdapter.java:63)
at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapter(ExtensionPointImpl.java:442)
at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapter(ExtensionPointImpl.java:429)
at com.intellij.openapi.extensions.impl.ExtensionPointImpl.access$100(ExtensionPointImpl.java:33)
at com.intellij.openapi.extensions.impl.ExtensionPointImpl$1.next(ExtensionPointImpl.java:337)
at com.intellij.openapi.extensions.impl.ExtensionProcessingHelper.computeSafeIfAny(ExtensionProcessingHelper.java:39)
at com.intellij.openapi.extensions.ExtensionPointName.computeSafeIfAny(ExtensionPointName.java:60)
at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.getFileTypeByFile(FileTypeManagerImpl.java:742)
at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.getFileTypeByFile(FileTypeManagerImpl.java:736)
at com.intellij.openapi.vfs.VirtualFile.getFileType(VirtualFile.java:328)
at com.intellij.psi.SingleRootFileViewProvider.<init>(SingleRootFileViewProvider.java:59)
at com.intellij.psi.impl.PsiFileFactoryImpl.trySetupPsiForFile(PsiFileFactoryImpl.java:111)
at com.intellij.psi.impl.PsiFileFactoryImpl.createFileFromText(PsiFileFactoryImpl.java:95)
at com.intellij.psi.impl.PsiFileFactoryImpl.createFileFromText(PsiFileFactoryImpl.java:48)
at org.jetbrains.plugins.groovy.lang.psi.impl.GroovyPsiElementFactoryImpl.createDummyFile(GroovyPsiElementFactoryImpl.java:375)
at org.jetbrains.plugins.groovy.lang.psi.impl.GroovyPsiElementFactoryImpl.createGroovyFile(GroovyPsiElementFactoryImpl.java:621)
at org.jetbrains.plugins.groovy.lang.psi.impl.GroovyPsiElementFactoryImpl.createExpressionFromText(GroovyPsiElementFactoryImpl.java:169)
at org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElementFactory.createExpressionFromText(GroovyPsiElementFactory.java:146)
at com.android.tools.idea.gradle.dsl.parser.groovy.GroovyDslUtil.createLiteral(GroovyDslUtil.java:375)
at com.android.tools.idea.gradle.dsl.parser.groovy.GroovyDslParser.convertToPsiElement(GroovyDslParser.java:147)
at com.android.tools.idea.gradle.dsl.parser.elements.FakeElement.lambda$createPsiElement$0(FakeElement.java:66)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:807)
at com.android.tools.idea.gradle.dsl.parser.elements.FakeElement.createPsiElement(FakeElement.java:66)
at com.android.tools.idea.gradle.dsl.parser.elements.FakeElement.produceValue(FakeElement.java:118)
at com.android.tools.idea.gradle.dsl.model.CachedValue.updateValue(CachedValue.java:68)
at com.android.tools.idea.gradle.dsl.model.CachedValue.getValue(CachedValue.java:53)
at com.android.tools.idea.gradle.dsl.parser.elements.GradleDslSimpleExpression.getValue(GradleDslSimpleExpression.java:119)
at com.android.tools.idea.gradle.dsl.model.ext.GradlePropertyModelImpl.extractAndGetValueType(GradlePropertyModelImpl.java:523)
at com.android.tools.idea.gradle.dsl.model.ext.GradlePropertyModelImpl.getValueType(GradlePropertyModelImpl.java:108)
at com.android.tools.idea.gradle.dsl.model.ext.PropertyUtil.resolveModel(PropertyUtil.java:130)
at com.android.tools.idea.gradle.dsl.model.ext.ResolvedPropertyModelImpl.resolveModel(ResolvedPropertyModelImpl.java:245)
at com.android.tools.idea.gradle.dsl.model.ext.ResolvedPropertyModelImpl.toString(ResolvedPropertyModelImpl.java:168)
at com.android.tools.idea.gradle.structure.model.android.PsDeclaredLibraryAndroidDependency.getSpec(PsLibraryAndroidDependency.kt:51)
at com.android.tools.idea.gradle.structure.model.PsDeclaredLibraryDependency$DefaultImpls.toKey(PsLibraryDependency.kt:36)
at com.android.tools.idea.gradle.structure.model.android.PsDeclaredLibraryAndroidDependency.toKey(PsLibraryAndroidDependency.kt:43)
at com.android.tools.idea.gradle.structure.model.PsDeclaredDependencyCollection.refreshParsedDependencies(PsDependencyCollection.kt:176)
at com.android.tools.idea.gradle.structure.model.PsDeclaredDependencyCollection.refresh(PsDependencyCollection.kt:171)
at com.android.tools.idea.gradle.structure.model.android.PsAndroidModule.init(PsAndroidModule.kt:90)
at com.android.tools.idea.gradle.structure.model.PsModuleCollection.update(PsModuleCollection.kt:110)
at com.android.tools.idea.gradle.structure.model.PsModuleCollection.update(PsModuleCollection.kt:38)
at com.android.tools.idea.gradle.structure.model.android.PsCollectionBase.refresh(PsCollectionBase.kt:44)
at com.android.tools.idea.gradle.structure.model.PsProjectImpl.applyChanges(PsProjectImpl.kt:111)
at com.android.tools.idea.gradle.structure.configurables.PsContextImpl.applyChanges(PsContextImpl.kt:218)
at com.android.tools.idea.gradle.structure.configurables.ProjectPerspectiveConfigurable.apply(ProjectPerspectiveConfigurable.kt:49)
at com.android.tools.idea.structure.dialog.ProjectStructureConfigurable.apply(ProjectStructureConfigurable.kt:384)
at com.intellij.openapi.options.newEditor.ConfigurableEditor.apply(ConfigurableEditor.java:324)
at com.intellij.openapi.options.newEditor.ConfigurableEditor.apply(ConfigurableEditor.java:135)
at com.intellij.openapi.options.newEditor.SettingsDialog.applyAndClose(SettingsDialog.java:197)
at com.intellij.openapi.options.newEditor.SettingsDialog.doOKAction(SettingsDialog.java:193)
at com.android.tools.idea.structure.dialog.ProjectStructureConfigurable$showDialog$dialog$1.doOKAction(ProjectStructureConfigurable.kt:294)
at com.intellij.openapi.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1881)
at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1834)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at com.chrisrm.idea.ui.MTButtonUI$ButtonHighlighter.mouseReleased(MTButtonUI.java:387)
at java.awt.Component.processMouseEvent(Component.java:6550)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6315)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4899)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.C
This is an issue with the JDK version being too recent, as shown in this line:
CsvFileTypeOverrider: net/seesharpsoft/intellij/plugins/csv/CsvFileTypeOverrider has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I had a similar bug where Gradle sync died immediately with the Cause: invalid type code: 1C error. Switching the JDK from OpenJDK 14 I installed to the integrated JDK that comes bundled with Android Studio fixed the issue.
To switch the JDK version, go to File > Project Structure, select "SDK Location" on the left sidebar, and under "JDK Location" select the dropdown arrow and then select Embedded JDK: C:\Users\user\...
New Java versions need new Gradle ones.
Go to Project Structure then change:
Plugin version to the newest stable one. ( Mine is 4.0.0 and 4.0.1).
Gradle Version to ...( Mine is 6.6.1).
That is all. It is fixed. You can try it.
i have same problem. i try to change the version of gradle at project tab of dependences.but i ran to other problems .anyway maybe it will work for you

Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

I updated Android Studio to version 3.6 and after running my projects i got this error saying "Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
"
2020-02-28 14:44:25,568 [ 542460] WARN - e.project.sync.GradleSyncState - Gradle sync failed: Cause: invalid type code: 85
Consult IDE log for more details (Help | Show Log) (1 s 245 ms)
2020-02-28 14:44:25,568 [ 542460] WARN - e.project.sync.GradleSyncState -
java.lang.RuntimeException:
at com.android.tools.idea.gradle.project.sync.idea.ProjectSetUpTask.onFailure(ProjectSetUpTask.java:120)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.executeImpl(ExternalSystemUtil.java:576)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.lambda$execute$0(ExternalSystemUtil.java:388)
at com.intellij.openapi.project.DumbServiceImpl.suspendIndexingAndRun(DumbServiceImpl.java:149)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:388)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$5.run(ExternalSystemUtil.java:649)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:894)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:408)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-02-28 14:44:25,649 [ 542541] INFO - roid.tools.ndk.GradleWorkspace - Updating model took 0.039s
2020-02-28 14:44:25,895 [ 542787] INFO - ge.ExternalProjectsDataStorage - Save external projects data in 5 ms
2020-02-28 14:44:26,052 [ 542944] INFO - rationStore.ComponentStoreImpl - Saving Project 'C:\Users\himan\AndroidStudioProjects\Charging' ChargingKotlin2JvmCompilerArguments took 18 ms
2020-02-28 14:44:26,078 [ 542970] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 213 ms
2020-02-28 14:44:30,859 [ 547751] INFO - ide.actions.ShowFilePathAction -
Exit code 1
After trying whole day to solve this problem i got this solution
i had jdk13 and after updating Android studio to 3.6.0, and with that groovy's latest version was also updated, on some websites it showed that groovy had some issues with jdk 9+ in latest version.
So i downgraded jdk from jdk13 to jdk8 and problem got solved
Just my 2 cents here but I get this error when I put an apostrophe in my project name.
It happens if you put some special characters in the Project Name while creating the project.
Just try removing any special characters(if any) from your project name.
While making a project, if you put any special characters in your Project name, you get this kind of error.
You won't be having a res folder and the gradle files would be misplaced.
I accidentally tapped codecleanup and then the errors got started. what i did was copy paste project gradle and gradle properties from some similar projects and then it was good to go.
I don't say it is perfect solution but it worked for me and may work for others as well

How to import Android Studio (1.0) project into Intellij 14 Ultimate

I have an Android Studio project and I would like to start using Intellij 14 Ultimate to take advantage of some of the cool features it has to offer. When I try to open my project I get a message saying:
Gradle Sync
Version 1.0.0-rc4 of the Android Gradle plug-in requires Gradle null or newer. A local Gradle distribution was not found ....
Click 'OK' to use the Gradle wrapper.
I click ok and it tries to Sync, but fails. Here is what the error console says:
Gradle version 2.2 is required. Current version is 2.1. If using the gradle wrapper, try editing the distributionUrl in ~gradle-wrapper.properties~
I modify the file click "Try Again"
Nothing happens. Here is what is in the log file:
2014-12-13 09:40:23,845 [ 572317] ERROR - llij.ide.plugins.PluginManager - null
java.lang.AssertionError
at com.android.tools.idea.gradle.project.PreSyncChecks.attemptToUpdateGradleVersionInWrapper(PreSyncChecks.java:175)
at com.android.tools.idea.gradle.project.PreSyncChecks.ensureCorrectGradleSettings(PreSyncChecks.java:72)
at com.android.tools.idea.gradle.project.PreSyncChecks.canSync(PreSyncChecks.java:53)
at com.android.tools.idea.gradle.project.GradleProjectImporter.doImport(GradleProjectImporter.java:439)
at com.android.tools.idea.gradle.project.GradleProjectImporter.doRequestSync(GradleProjectImporter.java:219)
at com.android.tools.idea.gradle.project.GradleProjectImporter.access$000(GradleProjectImporter.java:77)
at com.android.tools.idea.gradle.project.GradleProjectImporter$2.run(GradleProjectImporter.java:184)
at com.intellij.ui.AppUIUtil.invokeLaterIfProjectAlive(AppUIUtil.java:77)
at com.android.tools.idea.gradle.project.GradleProjectImporter.requestProjectSync(GradleProjectImporter.java:191)
at com.android.tools.idea.gradle.project.GradleProjectImporter.requestProjectSync(GradleProjectImporter.java:166)
at com.android.tools.idea.editors.ProjectSyncStatusNotificationProvider$ProjectImportFailedNotificationPanel$1.run(ProjectSyncStatusNotificationProvider.java:105)
at com.intellij.ui.EditorNotificationPanel$2.hyperlinkActivated(EditorNotificationPanel.java:95)
at com.intellij.ui.HyperlinkAdapter.hyperlinkUpdate(HyperlinkAdapter.java:28)
at com.intellij.ui.HyperlinkLabel.fireHyperlinkEvent(HyperlinkLabel.java:187)
at com.intellij.ui.HyperlinkLabel.processMouseEvent(HyperlinkLabel.java:120)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4489)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:748)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:573)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
2014-12-13 09:40:23,846 [ 572318] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 14.0.2 Build #IU-139.659.2
2014-12-13 09:40:23,846 [ 572318] ERROR - llij.ide.plugins.PluginManager - JDK: 1.7.0_71
2014-12-13 09:40:23,846 [ 572318] ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) 64-Bit Server VM
2014-12-13 09:40:23,846 [ 572318] ERROR - llij.ide.plugins.PluginManager - Vendor: Oracle Corporation
2014-12-13 09:40:23,846 [ 572318] ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X
2014-12-13 09:40:23,846 [ 572318] ERROR - llij.ide.plugins.PluginManager - Last Action: $Copy
I've also tried importing the project and get similar results. Any ideas?
Idea support pointed me to this:
https://youtrack.jetbrains.com/issue/IDEA-134118
Basically changing my gradle dependency fixed it
//For Android Studio
//classpath 'com.android.tools.build:gradle:1.0.0-rc4'
// For Intellij
classpath 'com.android.tools.build:gradle:0.14.4'
Resync and success!
I had the same thing happening to me tonight, however it provided me with a link to download the latest Gradle dependency. I downloaded it and it solved all of my problems, it will probably solve all of your's too!
This might be a recent solution, I upgraded to 14.0.3 and it solved the problem.

Intellij Idea log GradleConnectionException: Could not execute build using Gradle installation while building

I use Intellij Idea 13.1.1 and I get GradleConnectionException while building:
Error:org.gradle.tooling.GradleConnectionException:
Could not execute build using Gradle installation 'C:\Users\<USER_NAME>\.gradle\wrapper\dists\gradle-1.10-all\6vpvhqu0efs1fqmqr2decq1v12\gradle-1.10'.:
Could not execute build using Gradle installation 'C:\Users\<USER_NAME>\.gradle\wrapper\dists\gradle-1.10-all\6vpvhqu0efs1fqmqr2decq1v12\gradle-1.10'.
I've seen similar question here and googled it. But it didn't help me.
In the end I found Idea's buld log and this is the exception with more details from there (sorry for very long log, but it's just for more detailed information):
2014-06-04 10:41:20,732 [ 0] INFO - jps.cmdline.JpsModelLoaderImpl - Loading model: project path = <PATH_TO_MY_PROJECT>, global options path = C:/Users/<USER_NAME>/.IdeaIC13/config/options
2014-06-04 10:41:21,404 [ 672] INFO - jps.cmdline.JpsModelLoaderImpl - Model loaded in 673 ms
2014-06-04 10:41:21,404 [ 672] INFO - jps.cmdline.JpsModelLoaderImpl - Project has 3 modules, 14 libraries
2014-06-04 10:41:21,643 [ 911] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=688586752
2014-06-04 10:41:22,288 [ 1556] INFO - .incremental.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:false
2014-06-04 10:41:22,292 [ 1560] INFO - r.api.ClassFilesIndicesBuilder - class files data index disabled
2014-06-04 10:41:22,329 [ 1597] INFO - penapi.util.io.win32.IdeaWin32 - Native filesystem for Windows is operational
2014-06-04 10:41:22,456 [ 1724] INFO - der.AndroidGradleTargetBuilder - Using execution settings: BuilderExecutionSettings[embeddedGradleDaemonEnabled=false, buildMode=SOURCE_GEN, gradleDaemonMaxIdleTimeInMs=60000, gradleDaemonCommandLineOptions=[], gradleDaemonJvmOptions=[], gradleHomeDir=C:\Users\<USER_NAME>\.gradle\wrapper\dists\gradle-1.10-all\6vpvhqu0efs1fqmqr2decq1v12\gradle-1.10, gradleServiceDir=null, javaHomeDir=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 13.1.1\jre\jre, offlineBuild=false, parallelBuild=false, projectDir=<PATH_TO_MY_PROJECT>, verboseLoggingEnabled=false, modulesToBuildNames=[<PROJECT_NAME>, <PROJECT_NAME>-<PROJECT_NAME>, <PROJECT_NAME_SAMPLE>]]
2014-06-04 10:41:22,458 [ 1726] INFO - der.AndroidGradleTargetBuilder - Gradle build using tasks: [:<PROJECT_NAME>:generateDebugSources, :<PROJECT_NAME_SAMPLE>:generateDebugSources]
2014-06-04 10:41:22,460 [ 1728] INFO - der.AndroidGradleTargetBuilder - About to build project '<PROJECT_NAME>' located at <PATH_TO_MY_PROJECT>
2014-06-04 10:41:22,537 [ 1805] INFO - der.AndroidGradleTargetBuilder - Passing JVM args to Gradle Tooling API: [-Dandroid.home=C:\adt-bundle-windows-x86_64-20131030\sdk]
2014-06-04 10:41:24,934 [ 4202] INFO - .incremental.IncProjectBuilder - org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle installation 'C:\Users\<USER_NAME>\.gradle\wrapper\dists\gradle-1.10-all\6vpvhqu0efs1fqmqr2decq1v12\gradle-1.10'.
org.jetbrains.jps.incremental.ProjectBuildException: org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle installation 'C:\Users\<USER_NAME>\.gradle\wrapper\dists\gradle-1.10-all\6vpvhqu0efs1fqmqr2decq1v12\gradle-1.10'.
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:877)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:772)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:595)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:352)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:184)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:224)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle installation 'C:\Users\<USER_NAME>\.gradle\wrapper\dists\gradle-1.10-all\6vpvhqu0efs1fqmqr2decq1v12\gradle-1.10'.
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:55)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultBuildLauncher.run(DefaultBuildLauncher.java:67)
at com.android.tools.idea.jps.builder.AndroidGradleTargetBuilder.doBuild(AndroidGradleTargetBuilder.java:331)
at com.android.tools.idea.jps.builder.AndroidGradleTargetBuilder.build(AndroidGradleTargetBuilder.java:131)
at com.android.tools.idea.jps.builder.AndroidGradleTargetBuilder.build(AndroidGradleTargetBuilder.java:76)
at org.jetbrains.jps.incremental.BuildOperations.buildTarget(BuildOperations.java:101)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:819)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:857)
... 14 more
Caused by: org.gradle.launcher.daemon.client.DaemonConnectionException: The newly created daemon process has a different context than expected.
It won't be possible to reconnect to this daemon. Context mismatch:
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 13.1.1\jre\jre,daemonRegistryDir=C:\Users\<USER_NAME>\.gradle\daemon,pid=1644,idleTimeout=null,daemonOpts=-Dfile.encoding=windows-1251]
Actual: DefaultDaemonContext[uid=bb72a914-1081-4f81-a9b1-67c8d0a9106d,javaHome=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 13.1.1\jre,daemonRegistryDir=C:\Users\<USER_NAME>\.gradle\daemon,pid=5592,idleTimeout=60000,daemonOpts=-Dfile.encoding=windows-1251]
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connectToDaemonWithId(DefaultDaemonConnector.java:119)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:99)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:72)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:149)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:74)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:42)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:53)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:30)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:106)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:93)
at org.gradle.tooling.internal.provider.DefaultConnection.getModel(DefaultConnection.java:133)
at org.gradle.tooling.internal.consumer.connection.ModelBuilderBackedModelProducer.produceModel(ModelBuilderBackedModelProducer.java:44)
at org.gradle.tooling.internal.consumer.connection.GradleBuildAdapterProducer.produceModel(GradleBuildAdapterProducer.java:42)
at org.gradle.tooling.internal.consumer.connection.ModelBuilderBackedConsumerConnection.run(ModelBuilderBackedConsumerConnection.java:50)
at org.gradle.tooling.internal.consumer.DefaultBuildLauncher$1.run(DefaultBuildLauncher.java:77)
at org.gradle.tooling.internal.consumer.DefaultBuildLauncher$1.run(DefaultBuildLauncher.java:71)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:82)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConsumerActionExecutor.run(LoggingInitializerConsumerActionExecutor.java:44)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
... 3 more
Any ideas?
Update
This directory exists:
C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 13.1.1\jre\jre
And I have JAVA_HOME variable it is
C:\Java\jdk1.7.0_45
Also I have 2 gradle.properties files in
C:\Users\<USER_NAME>\.gradle\wrapper\dists\gradle-1.10-all\6vpvhqu0efs1fqmqr2decq1v12\gradle-1.10\samples\userguide\tutorial\properties\gradle.properties
and
C:\Users\<USER_NAME>\.gradle\wrapper\dists\gradle-1.10-all\6vpvhqu0efs1fqmqr2decq1v12\gradle-1.10\samples\signing\maven\gradle.properties
I tried to put org.gradle.java.home=C:/Java/jdk1.7.0_45 in each of them, but it did not help me.
What am I doing wrong?
Check your JDK home path in Platform Settings.
In my case it had extra '/jre' suffix, which caused the same error as you described.
I don't know why the daemon tries to use Java from C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 13.1.1\jre\jre (is there such directory) but the problem is likely related to JAVA_HOME env variable or org.gradle.java.home in gradle.properties. http://forums.gradle.org/gradle/topics/gradle_daemon_different_context can give you some hints how to solve the problem.
I was getting this error using JDK 1.7.0_71.
Reverting to using my old 1.7.0_60 fixed it.

Categories

Resources