I just import project.I get error signs at res and src folders. I decided to create a project from existing code.I still get error.I get errors not for all project but for a few projects,mainly all google samples:
java.lang.reflect.InvocationTargetException
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.createProjectAsync(NewProjectCreator.java:677)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.access$0(NewProjectCreator.java:590)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator$3.execute(NewProjectCreator.java:400)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.core.internal.resources.ResourceException: Invalid project description.
at org.eclipse.core.internal.resources.Project.checkDescription(Project.java:175)
at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:53)
at org.eclipse.core.internal.resources.Project.create(Project.java:287)
at org.eclipse.core.internal.resources.Project.create(Project.java:269)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.createEclipseProject(NewProjectCreator.java:727)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.createProjectAsync(NewProjectCreator.java:660)
... 6 more
Root exception:
org.eclipse.core.internal.resources.ResourceException: Invalid project description.
at org.eclipse.core.internal.resources.Project.checkDescription(Project.java:175)
at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:53)
at org.eclipse.core.internal.resources.Project.create(Project.java:287)
at org.eclipse.core.internal.resources.Project.create(Project.java:269)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.createEclipseProject(NewProjectCreator.java:727)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.createProjectAsync(NewProjectCreator.java:660)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator.access$0(NewProjectCreator.java:590)
at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator$3.execute(NewProjectCreator.java:400)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Contains: OK
Contains: C:\Users\ramapriya\workspace\InteractiveChart overlaps the location of another project: 'InteractiveChart'
I restarted eclipse.my computer,cleared all projects.Got no clue how to solve this.
Thanks
EDIT: I need to mention that some projects run successfully with no errors(before) now show errors.The projects work just fine/
So I tried changing the themes,the java files.Nothing worked.All I had to do was:
Go to project properties(Right Click your project)
Go to Android Target,Click most Recent.
Ok, Apply,there you go! :D
Related
I'm currently creating an application with Android Studio and Kotlin.
This morning, when I tried to run the app on the emulator and my phone, I got an error but what I don't understand it's I barely change the code : I just added a textview (tried to delete it but I still got the error. I tried to investigate and do think but none of them worked. I still don't really understand the error, could you help me fix it ?
Here the error :
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
Caused by: com.android.aaptcompiler.ResourceCompilationException: Resource compilation failed. Check logs for details.
at com.android.aaptcompiler.ResourceCompiler.compileResource(ResourceCompiler.kt:126)
at com.android.build.gradle.internal.res.ResourceCompilerRunnable$Companion.compileSingleResource(ResourceCompilerRunnable.kt:34)
at com.android.build.gradle.internal.res.ResourceCompilerRunnable.run(ResourceCompilerRunnable.kt:15)
at com.android.build.gradle.internal.profile.ProfileAwareWorkAction.execute(ProfileAwareWorkAction.kt:74)
... 3 more
Caused by: java.lang.NullPointerException
at com.android.aaptcompiler.TableExtractor.flattenXmlSubTree(TableExtractor.kt:851)
at com.android.aaptcompiler.TableExtractor.parseXml(TableExtractor.kt:516)
at com.android.aaptcompiler.TableExtractor.parseArrayImpl(TableExtractor.kt:1300)
at com.android.aaptcompiler.TableExtractor.parseStringArray(TableExtractor.kt:1243)
at com.android.aaptcompiler.TableExtractor.access$parseStringArray(TableExtractor.kt:146)
at com.android.aaptcompiler.TableExtractor$extractResource$parseBagMethod$13.invoke(TableExtractor.kt:437)
at com.android.aaptcompiler.TableExtractor$extractResource$parseBagMethod$13.invoke(TableExtractor.kt:437)
at com.android.aaptcompiler.TableExtractor.extractResource(TableExtractor.kt:458)
at com.android.aaptcompiler.TableExtractor.extractResourceValues(TableExtractor.kt:267)
at com.android.aaptcompiler.TableExtractor.extract(TableExtractor.kt:182)
at com.android.aaptcompiler.ResourceCompiler.compileTable(ResourceCompiler.kt:186)
at com.android.aaptcompiler.ResourceCompiler.access$compileTable(ResourceCompiler.kt:1)
at com.android.aaptcompiler.ResourceCompiler$getCompileMethod$1.invoke(ResourceCompiler.kt:137)
at com.android.aaptcompiler.ResourceCompiler$getCompileMethod$1.invoke(ResourceCompiler.kt:137)
at com.android.aaptcompiler.ResourceCompiler.compileResource(ResourceCompiler.kt:123)
... 29 more
Thanks a lot
EDIT :
So, I've searched a lot, tried many things but none of them worked. Because my project is still small, I created a new project and copy/paste all my code and I this new project everything work and I don't have any error anymore.
Good luck if you encounter the same error.
Just had this error myself and after awhile managed to find the issue, I had strings within array-lists located in my strings.xml, some of my strings included apostrophes, for instance in don't won't can't.
Removing these allowed me to build my project again.
The solution that worked for me is locate the String.xml file. Delete the unused Strings I meant the strings that didnt had any reference in arrayList file.
Make sure gradle offline mode is not enabled.
Then do file->invalidate
then click invalidate and restart.
This should solve the issue
I am attempting to reopen an older Android Studio project in version 3.0.
It compiles and launches just fine, but if I try to edit a layout in the layout designer, it won't load and simply keeps saying that it is waiting for the build to finish (which it has).
When I look in the IDE errors, I see this error:
provider: org.jetbrains.android.augment.AndroidPsiAugmentProvider#2180343: Resource name cannot be empty.
As I look though the trace info, I see nothing that points back at my project.
Any suggestions?
Here is the full trace output:
provider: org.jetbrains.android.augment.AndroidPsiAugmentProvider#2180343: Resource name cannot be empty.
java.lang.IllegalArgumentException: Resource name cannot be empty.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at com.android.ide.common.res2.ResourceItem.<init>(ResourceItem.java:115)
at com.android.ide.common.res2.IdGeneratingResourceParser$IdResourceItem.<init>(IdGeneratingResourceParser.java:202)
at com.android.ide.common.res2.IdGeneratingResourceParser.<init>(IdGeneratingResourceParser.java:81)
at com.android.ide.common.res2.ResourceSet.createResourceFile(ResourceSet.java:456)
at com.android.ide.common.res2.ResourceSet.createFileAndItems(ResourceSet.java:111)
at com.android.ide.common.res2.ResourceSet.handleNewFile(ResourceSet.java:257)
at com.android.ide.common.res2.ResourceSet.handleNewFile(ResourceSet.java:52)
at com.android.ide.common.res2.DataSet.loadFile(DataSet.java:275)
at com.android.tools.idea.res.ResourceFolderRepository$InitialScanState.loadFile(ResourceFolderRepository.java:325)
at com.android.tools.idea.res.ResourceFolderRepository.scanFileResourceFile(ResourceFolderRepository.java:524)
at com.android.tools.idea.res.ResourceFolderRepository.scanFileResourceFolder(ResourceFolderRepository.java:477)
at com.android.tools.idea.res.ResourceFolderRepository.scanResFolder(ResourceFolderRepository.java:449)
at com.android.tools.idea.res.ResourceFolderRepository.scanRemainingFiles(ResourceFolderRepository.java:375)
at com.android.tools.idea.res.ResourceFolderRepository.<init>(ResourceFolderRepository.java:119)
at com.android.tools.idea.res.ResourceFolderRepository.create(ResourceFolderRepository.java:152)
at com.android.tools.idea.res.ResourceFolderRegistry.get(ResourceFolderRegistry.java:76)
at com.android.tools.idea.res.ResourceFolderRegistry.get(ResourceFolderRegistry.java:64)
at com.android.tools.idea.res.ModuleResourceRepository.create(ModuleResourceRepository.java:95)
at com.android.tools.idea.res.ResourceRepositories.lambda$getModuleResources$2(ResourceRepositories.java:98)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:942)
at com.android.tools.idea.res.ResourceRepositories.getModuleResources(ResourceRepositories.java:95)
at com.android.tools.idea.res.ModuleResourceRepository.findModuleResources(ModuleResourceRepository.java:71)
at com.android.tools.idea.res.ModuleResourceRepository.getOrCreateInstance(ModuleResourceRepository.java:59)
at com.android.tools.idea.res.ProjectResourceRepository.computeRepositories(ProjectResourceRepository.java:81)
at com.android.tools.idea.res.ProjectResourceRepository.create(ProjectResourceRepository.java:73)
at com.android.tools.idea.res.ResourceRepositories.lambda$getProjectResources$1(ResourceRepositories.java:83)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:942)
at com.android.tools.idea.res.ResourceRepositories.getProjectResources(ResourceRepositories.java:80)
at com.android.tools.idea.res.ProjectResourceRepository.findProjectResources(ProjectResourceRepository.java:63)
at com.android.tools.idea.res.ProjectResourceRepository.getOrCreateInstance(ProjectResourceRepository.java:51)
at com.android.tools.idea.res.AppResourceRepository.computeRepositories(AppResourceRepository.java:156)
at com.android.tools.idea.res.AppResourceRepository.create(AppResourceRepository.java:123)
at com.android.tools.idea.res.ResourceRepositories.lambda$getAppResources$0(ResourceRepositories.java:68)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:942)
at com.android.tools.idea.res.ResourceRepositories.getAppResources(ResourceRepositories.java:65)
at com.android.tools.idea.res.AppResourceRepository.findAppResources(AppResourceRepository.java:117)
at com.android.tools.idea.res.AppResourceRepository.getOrCreateInstance(AppResourceRepository.java:99)
at org.jetbrains.android.dom.converters.ResourceReferenceConverter.getResourceTypesInCurrentModule(ResourceReferenceConverter.java:262)
at org.jetbrains.android.augment.AndroidPsiAugmentProvider.getAugments(AndroidPsiAugmentProvider.java:67)
at com.intellij.psi.augment.PsiAugmentProvider.lambda$collectAugments$0(PsiAugmentProvider.java:93)
at com.intellij.psi.augment.PsiAugmentProvider.forEach(PsiAugmentProvider.java:137)
at com.intellij.psi.augment.PsiAugmentProvider.collectAugments(PsiAugmentProvider.java:92)
at com.intellij.psi.impl.source.ClassInnerStuffCache.getAllInnerClasses(ClassInnerStuffCache.java:139)
at com.intellij.psi.impl.source.ClassInnerStuffCache.lambda$getInnerClasses$3(ClassInnerStuffCache.java:72)
at com.intellij.psi.util.CachedValuesManager.lambda$getCachedValue$0(CachedValuesManager.java:141)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:137)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:127)
at com.intellij.psi.impl.source.ClassInnerStuffCache.getInnerClasses(ClassInnerStuffCache.java:71)
at com.intellij.psi.impl.source.ClassInnerStuffCache.getInnerClassesMap(ClassInnerStuffCache.java:182)
at com.intellij.psi.impl.source.ClassInnerStuffCache.lambda$findInnerClassByName$6(ClassInnerStuffCache.java:102)
at com.intellij.psi.util.CachedValuesManager.lambda$getCachedValue$0(CachedValuesManager.java:141)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:137)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:127)
at com.intellij.psi.impl.source.ClassInnerStuffCache.findInnerClassByName(ClassInnerStuffCache.java:101)
at com.intellij.psi.impl.source.PsiClassImpl.findInnerClassByName(PsiClassImpl.java:396)
at org.jetbrains.android.util.AndroidResourceUtil.findResourceFieldsFromClass(AndroidResourceUtil.java:190)
at org.jetbrains.android.util.AndroidResourceUtil.findResourceFields(AndroidResourceUtil.java:182)
at org.jetbrains.android.util.AndroidResourceUtil.findResourceFields(AndroidResourceUtil.java:168)
at org.jetbrains.android.AndroidGotoRelatedProvider.collectRelatedJavaFiles(AndroidGotoRelatedProvider.java:182)
at org.jetbrains.android.AndroidGotoRelatedProvider.getLazyItemsForXmlFile(AndroidGotoRelatedProvider.java:112)
at org.jetbrains.android.AndroidLineMarkerProvider.getMarkerInfo(AndroidLineMarkerProvider.java:91)
at org.jetbrains.android.AndroidLineMarkerProvider.doGetLineMarkerInfo(AndroidLineMarkerProvider.java:52)
at org.jetbrains.android.AndroidLineMarkerProvider.collectSlowLineMarkers(AndroidLineMarkerProvider.java:37)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:209)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:111)
at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:96)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:106)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:438)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1156)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:431)
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.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:430)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:406)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:142)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:242)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:404)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:165)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
java.lang.IllegalArgumentException: Resource name cannot be empty.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at com.android.ide.common.res2.ResourceItem.<init>(ResourceItem.java:115)
at com.android.ide.common.res2.IdGeneratingResourceParser$IdResourceItem.<init>(IdGeneratingResourceParser.java:202)
at com.android.ide.common.res2.IdGeneratingResourceParser.<init>(IdGeneratingResourceParser.java:81)
at com.android.ide.common.res2.ResourceSet.createResourceFile(ResourceSet.java:456)
at com.android.ide.common.res2.ResourceSet.createFileAndItems(ResourceSet.java:111)
at com.android.ide.common.res2.ResourceSet.handleNewFile(ResourceSet.java:257)
at com.android.ide.common.res2.ResourceSet.handleNewFile(ResourceSet.java:52)
at com.android.ide.common.res2.DataSet.loadFile(DataSet.java:275)
at com.android.tools.idea.res.ResourceFolderRepository$InitialScanState.loadFile(ResourceFolderRepository.java:325)
at com.android.tools.idea.res.ResourceFolderRepository.scanFileResourceFile(ResourceFolderRepository.java:524)
at com.android.tools.idea.res.ResourceFolderRepository.scanFileResourceFolder(ResourceFolderRepository.java:477)
at com.android.tools.idea.res.ResourceFolderRepository.scanResFolder(ResourceFolderRepository.java:449)
at com.android.tools.idea.res.ResourceFolderRepository.scanRemainingFiles(ResourceFolderRepository.java:375)
at com.android.tools.idea.res.ResourceFolderRepository.<init>(ResourceFolderRepository.java:119)
at com.android.tools.idea.res.ResourceFolderRepository.create(ResourceFolderRepository.java:152)
at com.android.tools.idea.res.ResourceFolderRegistry.get(ResourceFolderRegistry.java:76)
at com.android.tools.idea.res.ResourceFolderRegistry.get(ResourceFolderRegistry.java:64)
at com.android.tools.idea.res.ModuleResourceRepository.create(ModuleResourceRepository.java:95)
at com.android.tools.idea.res.ResourceRepositories.lambda$getModuleResources$2(ResourceRepositories.java:98)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:942)
at com.android.tools.idea.res.ResourceRepositories.getModuleResources(ResourceRepositories.java:95)
at com.android.tools.idea.res.ModuleResourceRepository.findModuleResources(ModuleResourceRepository.java:71)
at com.android.tools.idea.res.ModuleResourceRepository.getOrCreateInstance(ModuleResourceRepository.java:59)
at com.android.tools.idea.res.ProjectResourceRepository.computeRepositories(ProjectResourceRepository.java:81)
at com.android.tools.idea.res.ProjectResourceRepository.create(ProjectResourceRepository.java:73)
at com.android.tools.idea.res.ResourceRepositories.lambda$getProjectResources$1(ResourceRepositories.java:83)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:942)
at com.android.tools.idea.res.ResourceRepositories.getProjectResources(ResourceRepositories.java:80)
at com.android.tools.idea.res.ProjectResourceRepository.findProjectResources(ProjectResourceRepository.java:63)
at com.android.tools.idea.res.ProjectResourceRepository.getOrCreateInstance(ProjectResourceRepository.java:51)
at com.android.tools.idea.res.AppResourceRepository.computeRepositories(AppResourceRepository.java:156)
at com.android.tools.idea.res.AppResourceRepository.create(AppResourceRepository.java:123)
at com.android.tools.idea.res.ResourceRepositories.lambda$getAppResources$0(ResourceRepositories.java:68)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:942)
at com.android.tools.idea.res.ResourceRepositories.getAppResources(ResourceRepositories.java:65)
at com.android.tools.idea.res.AppResourceRepository.findAppResources(AppResourceRepository.java:117)
at com.android.tools.idea.res.AppResourceRepository.getOrCreateInstance(AppResourceRepository.java:99)
at org.jetbrains.android.resourceManagers.LocalResourceManager.getResourceNames(LocalResourceManager.java:261)
at org.jetbrains.android.resourceManagers.ResourceManager.getResourceNames(ResourceManager.java:349)
at org.jetbrains.android.augment.ResourceTypeClassBase.buildResourceFields(ResourceTypeClassBase.java:40)
at org.jetbrains.android.augment.ResourceTypeClass.buildLocalResourceFields(ResourceTypeClass.java:30)
at org.jetbrains.android.augment.AndroidPsiAugmentProvider.getAugments(AndroidPsiAugmentProvider.java:107)
at com.intellij.psi.augment.PsiAugmentProvider.lambda$collectAugments$0(PsiAugmentProvider.java:93)
at com.intellij.psi.augment.PsiAugmentProvider.forEach(PsiAugmentProvider.java:137)
at com.intellij.psi.augment.PsiAugmentProvider.collectAugments(PsiAugmentProvider.java:92)
at com.intellij.psi.impl.source.ClassInnerStuffCache.getAllFields(ClassInnerStuffCache.java:125)
at com.intellij.psi.impl.source.ClassInnerStuffCache.lambda$getFields$1(ClassInnerStuffCache.java:60)
at com.intellij.psi.util.CachedValuesManager.lambda$getCachedValue$0(CachedValuesManager.java:141)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:137)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:127)
at com.intellij.psi.impl.source.ClassInnerStuffCache.getFields(ClassInnerStuffCache.java:59)
at com.intellij.psi.impl.source.ClassInnerStuffCache.getFieldsMap(ClassInnerStuffCache.java:145)
at com.intellij.psi.impl.source.ClassInnerStuffCache.lambda$findFieldByName$4(ClassInnerStuffCache.java:82)
at com.intellij.psi.util.CachedValuesManager.lambda$getCachedValue$0(CachedValuesManager.java:141)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:137)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:127)
at com.intellij.psi.impl.source.ClassInnerStuffCache.findFieldByName(ClassInnerStuffCache.java:80)
at com.intellij.psi.impl.source.PsiClassImpl.findFieldByName(PsiClassImpl.java:362)
at org.jetbrains.android.util.AndroidResourceUtil.findResourceFieldsFromClass(AndroidResourceUtil.java:195)
at org.jetbrains.android.util.AndroidResourceUtil.findResourceFields(AndroidResourceUtil.java:182)
at org.jetbrains.android.util.AndroidResourceUtil.findResourceFields(AndroidResourceUtil.java:168)
at org.jetbrains.android.AndroidGotoRelatedProvider.collectRelatedJavaFiles(AndroidGotoRelatedProvider.java:182)
at org.jetbrains.android.AndroidGotoRelatedProvider.getLazyItemsForXmlFile(AndroidGotoRelatedProvider.java:112)
at org.jetbrains.android.AndroidLineMarkerProvider.getMarkerInfo(AndroidLineMarkerProvider.java:91)
at org.jetbrains.android.AndroidLineMarkerProvider.doGetLineMarkerInfo(AndroidLineMarkerProvider.java:52)
at org.jetbrains.android.AndroidLineMarkerProvider.collectSlowLineMarkers(AndroidLineMarkerProvider.java:37)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:209)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:111)
at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:96)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:106)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:438)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1156)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:431)
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.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:430)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:406)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:142)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:242)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:404)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:165)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Update:
I have not found a solution yet, but a coworker working on another project (from which I forked my project) has just had the same thing happen to him. This leads me to think this may be project specific. However, none of the error trace shows anything in our project. This obviously makes it hard to diagnose.
This error can occur when you update to Android Studio 3.0. It doesn't affect your ability to build a project, but the error does not allow you to visually see your xml layout files. You will also get the error when committing files to GIT, but you can still commit and push.
What I found in one of my projects is that a file was added to the "menu" folder automatically upon Android Studio upgrade, and the file had no name. It was named simply ".xml". All you need to do is delete the file and clean your project, allowing a new build of the project. That should take care of the issue.
Go to File>Invalidate Caches / Restart.
It might help!
Thank you!
I am able to fix it by Uninstall Android Studio 3.0 and installed Android Studio 3.1. Its working fine.
Maybe you can try it like this:
go to setting in AndroidStudio and change values like in this image.
Then click ok.
I've kept the updates ON in Eclipse, so may be Google app engine is causing the problem,Still didn't got the solution.
The Error log is here
java.lang.reflect.InvocationTargetException
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:82)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 17090
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:180)
at com.google.gson.Gson.fromJson(Gson.java:755)
at com.google.gson.Gson.fromJson(Gson.java:721)
at com.google.gson.Gson.fromJson(Gson.java:670)
at com.google.gson.Gson.fromJson(Gson.java:642)
at com.google.gdt.eclipse.managedapis.ManagedApiUtils.findAndReadDependencyFile(ManagedApiUtils.java:185)
at com.google.gdt.eclipse.managedapis.ManagedApiUtils.findAndReadDependencyFile(ManagedApiUtils.java:179)
at com.google.gdt.eclipse.managedapis.ManagedApiUtils.findAndReadDependencyFile(ManagedApiUtils.java:179)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.copyToConnectedAndroidProject(SwarmServiceCreator.java:148)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:453)
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:80)
... 1 more
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 17090
at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:322)
The Problem is:-
I've created a project with the app engine and was running perfectly but to due to some error in build path i've deleted the project and the app engine from the workspace and imported it again.
Now whenever i generate client libraries from app engine then this error is coming.
I've tried cleaning project,closing and reopening eclipse then also its not working
please help me.
Edit
I've copied the same code in new project and its working fine but not in old project
Did you clean the project ?
First for all these issues have to clean project.
If it remains the error then check with Android Library you are working with.
Be assured of using latest Android Library that is 4.3 to 4.4.2.
If still remains the issue there might be problem with Google Api package reference.
Then add Google API reference 4.3 by going to properties of the project
Expected BEGIN_OBJECT but was STRING at line 1 column 17090.
this line shows that there is an issue in your json input string that you are giving as a input to the gson. if you resolve this, your problem might be solved.
Please Turn off Google AppEngine Updates before proceeding the steps.
Steps to turn off Updates of eclipse is:-
1) Window->preferences->Install/Update->Automatic Updates(Uncheck it)
Steps followed while creating the new project which resolved me the error is:-
1) Create New Android project.
2) Right Click on project then Google->Generate App Engine Backend which creates a new project named Project-AppEngine
3) Copied all the Entities and the endpoints in AppEngine project.
4) Now I tried to generate the Cloud Endpoint Library and it worked.
This answer is just to escape the problem if you are facing it.
i am starting with android development
i have created some sample application but
when i am opening .xml file resides in res/layout/main.xml
after that my eclipse crash and close.
i even try "open with android layout editor" which also crashes eclipse.
i am not getting why this problem occur.
my os is ubantu 9.04
and using eclipse Galileo
EDIT:
i am getting following error in my eclipse log file. what dose this means???
!ENTRY com.android.ide.eclipse.adt 4 0 2011-04-29 16:56:16.476
!MESSAGE loadAndParseRClass failed to find class com.saltriver.gui.R
!STACK 0
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at com.android.ide.eclipse.adt.internal.resources.manager.ProjectClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.android.ide.eclipse.adt.internal.resources.manager.CompiledResourcesMonitor.loadAndParseRClass(Unknown Source)
at com.android.ide.eclipse.adt.internal.resources.manager.CompiledResourcesMonitor.fileChanged(Unknown Source)
at com.android.ide.eclipse.adt.internal.resources.manager.GlobalProjectMonitor$DeltaVisitor.visit(Unknown Source)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:48)
at com.android.ide.eclipse.adt.internal.resources.manager.GlobalProjectMonitor$1.resourceChanged(Unknown Source)
at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:313)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1022)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1809)
at org.eclipse.core.internal.events.NotificationManager$NotifyJob.run(NotificationManager.java:40)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
"crash" is not very specific. Look into the file .metadata/.log in your workspace to see if Eclipse wrote an error message before it died.
If that doesn't help, start Eclipse from a console with -debug -console -consoleLog.
[EDIT] The error means that you're using Java X to run Eclipse but a plugin needs Java Y (where Y > X).
the usual case is that you run Eclipse with Java 5 and you have a plugin which needs Java 6. Unfortunately, the error message is useless: It doesn't tell you which class is the problem, from which JAR it came, which version it has and which versions are supported - The code has all the information but some smart guy decided that you don't need that. Pity.
So try to get the latest version of Java to run the IDE.
This is independent of the Java version which you use to build and run your projects!! It's just the VM which Eclipse uses to load its plugins. For VMs used in projects, see the Eclipse preferences.
Close 'Eclipse'
Go to your Eclipse folder open eclipse.ini file in any text editor.
after the line which says openFile add following two lines.
-vm
C:\Program Files\Java\jdk1.6.0_24\bin\javaw.exe
(This folder path may vary according to your java installation directory).
save and close.
Open eclipse and tadaaaa!!! you can open xml files again. :)
I have updated software and ADT in my Eclipse a number of times. I am unable to run projects above than 1.5.I have the following errors showing up in my console window after i create a HelloWorld project with API Level 4 (1.6):
[2010-04-04 22:21:53 - Framework Resource Parser] Collect resource IDs failed, class android.R not found in E:\Android\android-sdk_r04-windows\android-sdk-windows\platforms\android-1.6\android.jar
[2010-04-04 22:21:53 - Framework Resource Parser] Collect permissions failed, class android.Manifest$permission not found in E:\Android\android-sdk_r04-windows\android-sdk-windows\platforms\android-1.6\android.jar
[2010-04-04 22:21:54 - Android Framework Parser] failed to collect preference classes
How to resolve this issue?
I had this error and I did the next steps in order to solve:
Make a clean.
Restart the machine (Probably not necessary)
Delete a string in the strings.xml that I did not use any more.
After that, doing a build, the R class was regenerated and the project builded without errors.