I constantly get exceptions while opening and editing files in my Android Studio project from the Kotlin plugin. There is a notification saying
IDE Error Occured
and when I click on it it takes me to the "IDE fatal errors" reporting tool where it says:
Exception in Studio core
The error message is the following:
Kotlin resolution encountered a problem while analyzing KtCallExpression
org.jetbrains.kotlin.idea.caches.resolve.KotlinIdeaResolutionException: Kotlin resolution encountered a problem while analyzing KtCallExpression
at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeWithDebugInfo.analyze(ResolutionFacadeWithDebugInfo.kt:37)
at org.jetbrains.kotlin.idea.caches.resolve.ResolutionUtils.analyze(resolutionApi.kt:112)
at org.jetbrains.kotlin.idea.parameterInfo.ArgumentNameHintsKt.provideArgumentNameHints(ArgumentNameHints.kt:26)
at org.jetbrains.kotlin.idea.parameterInfo.HintType$PARAMETER_HINT.provideHints(KotlinInlayParameterHintsProvider.kt:78)
at org.jetbrains.kotlin.idea.parameterInfo.KotlinInlayParameterHintsProvider.getParameterHints(KotlinInlayParameterHintsProvider.kt:161)
at com.intellij.codeInsight.hints.ParameterHintsPass.process(ParameterHintsPass.java:84)
at com.intellij.codeInsight.hints.ParameterHintsPass.lambda$doCollectInformation$0(ParameterHintsPass.java:76)
at java.lang.Iterable.forEach(Iterable.java:75)
at com.intellij.codeInsight.hints.ParameterHintsPass.doCollectInformation(ParameterHintsPass.java:76)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:437)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:430)
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.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:429)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:405)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:218)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:403)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:170)
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)
Caused by: java.lang.AssertionError: Recursion detected on input: onCreate under LockBasedStorageManager#42a2e9fb (<unknown creating class>)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.getContributedFunctions(AbstractLazyMemberScope.kt:90)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getContributedFunctions(LazyClassMemberScope.kt:188)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.computeDescriptorsFromDeclaredElements(AbstractLazyMemberScope.kt:195)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope$descriptorsFromDeclaredElements$1.invoke(LazyClassMemberScope.kt:54)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope$descriptorsFromDeclaredElements$1.invoke(LazyClassMemberScope.kt:46)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:354)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:410)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getContributedDescriptors(LazyClassMemberScope.kt:68)
at org.jetbrains.kotlin.resolve.DescriptorUtils.getAllDescriptors(DescriptorUtils.java:593)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.resolveMemberHeaders(LazyClassDescriptor.java:573)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.doForceResolveAllContents(LazyClassDescriptor.java:543)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.lambda$new$4(LazyClassDescriptor.java:221)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:354)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.forceResolveAllContents(LazyClassDescriptor.java:539)
at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.doForceResolveAllContents(ForceResolveUtil.java:75)
at org.jetbrains.kotlin.resolve.lazy.ForceResolveUtil.forceResolveAllContents(ForceResolveUtil.java:41)
at org.jetbrains.kotlin.idea.caches.lightClasses.IDELightClassContexts.contextForNonLocalClassOrObject(IDELightClassContexts.kt:105)
at org.jetbrains.kotlin.idea.caches.resolve.IDELightClassGenerationSupport$createDataHolderForClass$3.invoke(IDELightClassGenerationSupport.kt:49)
at org.jetbrains.kotlin.idea.caches.resolve.IDELightClassGenerationSupport$createDataHolderForClass$3.invoke(IDELightClassGenerationSupport.kt:35)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder$exactResultLazyValue$1.invoke(LazyLightClassDataHolder.kt:46)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder$exactResultLazyValue$1.invoke(LazyLightClassDataHolder.kt:32)
at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:107)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder.getJavaFileStub(LazyLightClassDataHolder.kt)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder$LazyLightClassData$clsDelegate$2.invoke(LazyLightClassDataHolder.kt:103)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder$LazyLightClassData$clsDelegate$2.invoke(LazyLightClassDataHolder.kt:100)
at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:107)
at org.jetbrains.kotlin.idea.caches.lightClasses.LazyLightClassDataHolder$LazyLightClassData.getClsDelegate(LazyLightClassDataHolder.kt)
at org.jetbrains.kotlin.asJava.classes.KtLazyLightClass$clsDelegate$2.invoke(KtLazyLightClass.kt:26)
at org.jetbrains.kotlin.asJava.classes.KtLazyLightClass$clsDelegate$2.invoke(KtLazyLightClass.kt:23)
at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:107)
at org.jetbrains.kotlin.asJava.classes.KtLazyLightClass.getClsDelegate(KtLazyLightClass.kt)
at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration.getSuperTypes(KtLightClassForSourceDeclaration.kt:427)
at com.intellij.psi.impl.ScopedClassHierarchy.calcImmediateSupersWithCapturing(ScopedClassHierarchy.java:163)
at com.intellij.psi.impl.ScopedClassHierarchy.lambda$getImmediateSupersWithCapturing$2(ScopedClassHierarchy.java:148)
at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.psi.impl.ScopedClassHierarchy.getImmediateSupersWithCapturing(ScopedClassHierarchy.java:148)
at com.intellij.psi.impl.PsiClassImplUtil.getScopeCorrectedSuperTypes(PsiClassImplUtil.java:740)
at com.intellij.psi.impl.PsiClassImplUtil.processSuperTypes(PsiClassImplUtil.java:750)
at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClassNotCached(PsiClassImplUtil.java:724)
at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClass(PsiClassImplUtil.java:479)
at com.intellij.psi.impl.PsiClassImplUtil.lambda$processDeclarationsInClassNotCached$2(PsiClassImplUtil.java:725)
at com.intellij.psi.impl.PsiClassImplUtil.processSuperTypes(PsiClassImplUtil.java:755)
at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClassNotCached(PsiClassImplUtil.java:724)
at com.intellij.psi.impl.PsiClassImplUtil.lambda$createMembersMap$1(PsiClassImplUtil.java:406)
at com.intellij.util.containers.ConcurrentFactoryMap$4.create(ConcurrentFactoryMap.java:224)
at com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:63)
at com.intellij.psi.impl.PsiClassImplUtil$MembersMap.get(PsiClassImplUtil.java:359)
at com.intellij.psi.impl.PsiClassImplUtil$MembersMap.access$000(PsiClassImplUtil.java:351)
at com.intellij.psi.impl.PsiClassImplUtil.processCachedMembersByName(PsiClassImplUtil.java:558)
at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClass(PsiClassImplUtil.java:476)
at com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClass(PsiClassImplUtil.java:453)
at com.intellij.psi.impl.source.PsiClassImpl.processDeclarations(PsiClassImpl.java:488)
at com.intellij.psi.impl.source.PsiImportStaticReferenceElementImpl$OurGenericsResolver.resolve(PsiImportStaticReferenceElementImpl.java:238)
at com.intellij.psi.impl.source.PsiImportStaticReferenceElementImpl$OurGenericsResolver.resolve(PsiImportStaticReferenceElementImpl.java:227)
at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$0(ResolveCache.java:152)
at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:151)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:182)
at com.intellij.psi.impl.source.PsiImportStaticReferenceElementImpl.multiResolve(PsiImportStaticReferenceElementImpl.java:223)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.processDeclarationsNoGuess(PsiJavaFileBaseImpl.java:377)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.processDeclarations(PsiJavaFileBaseImpl.java:312)
at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:69)
at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:51)
at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:218)
at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:149)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.resolve(PsiJavaCodeReferenceElementImpl.java:492)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.access$100(PsiJavaCodeReferenceElementImpl.java:47)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl$OurGenericsResolver.resolve(PsiJavaCodeReferenceElementImpl.java:373)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl$OurGenericsResolver.resolve(PsiJavaCodeReferenceElementImpl.java:365)
at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolveWithCaching$1(ResolveCache.java:205)
at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:204)
at com.intellij.psi.impl.PsiImplUtil.multiResolveImpl(PsiImplUtil.java:724)
at com.intellij.psi.impl.PsiImplUtil.multiResolveImpl(PsiImplUtil.java:715)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.multiResolve(PsiJavaCodeReferenceElementImpl.java:424)
at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.advancedResolve(PsiJavaCodeReferenceElementImpl.java:417)
at com.intellij.psi.impl.source.PsiClassReferenceType.resolveGenerics(PsiClassReferenceType.java:191)
at org.jetbrains.kotlin.load.java.structure.impl.JavaClassifierTypeImpl.resolve(JavaClassifierTypeImpl.java:63)
at org.jetbrains.kotlin.load.java.structure.impl.JavaClassifierTypeImpl.isRaw(JavaClassifierTypeImpl.java:86)
at org.jetbrains.kotlin.load.java.lazy.types.JavaTypeResolver.transformJavaClassifierType(JavaTypeResolver.kt:88)
at org.jetbrains.kotlin.load.java.lazy.types.JavaTypeResolver.transformJavaType(JavaTypeResolver.kt:52)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaScope.resolveValueParameters(LazyJavaScope.kt:189)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaScope.resolveMethodToFunctionDescriptor(LazyJavaScope.kt:126)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaScope$functions$1.invoke(LazyJavaScope.kt:85)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaScope$functions$1.invoke(LazyJavaScope.kt:55)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:448)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:523)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaScope.getContributedFunctions(LazyJavaScope.kt:242)
at org.jetbrains.kotlin.load.java.lazy.descriptors.LazyJavaClassMemberScope.getContributedFunctions(LazyJavaClassMemberScope.kt:725)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getNonDeclaredFunctions(LazyClassMemberScope.kt:203)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.doGetFunctions(AbstractLazyMemberScope.kt:109)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.access$doGetFunctions(AbstractLazyMemberScope.kt:38)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$functionDescriptors$1.invoke(AbstractLazyMemberScope.kt:50)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$functionDescriptors$1.invoke(AbstractLazyMemberScope.kt:38)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:448)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:523)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.getContributedFunctions(AbstractLazyMemberScope.kt:90)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getContributedFunctions(LazyClassMemberScope.kt:188)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getNonDeclaredFunctions(LazyClassMemberScope.kt:203)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.doGetFunctions(AbstractLazyMemberScope.kt:109)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.access$doGetFunctions(AbstractLazyMemberScope.kt:38)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$functionDescriptors$1.invoke(AbstractLazyMemberScope.kt:50)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$functionDescriptors$1.invoke(AbstractLazyMemberScope.kt:38)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:448)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:523)
at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.getContributedFunctions(AbstractLazyMemberScope.kt:90)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getContributedFunctions(LazyClassMemberScope.kt:188)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver$resolveToDescriptor$1.visitNamedFunction(LazyDeclarationResolver.kt:125)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver$resolveToDescriptor$1.visitNamedFunction(LazyDeclarationResolver.kt:94)
at org.jetbrains.kotlin.psi.KtNamedFunction.accept(KtNamedFunction.java:49)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver.resolveToDescriptor(LazyDeclarationResolver.kt:94)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver.resolveToDescriptor(LazyDeclarationResolver.kt:91)
at org.jetbrains.kotlin.resolve.lazy.ResolveSession.resolveToDescriptor(ResolveSession.java:330)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.functionAdditionalResolve(ResolveElementCache.kt:589)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.performElementAdditionalResolve(ResolveElementCache.kt:317)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.getElementsAdditionalResolve(ResolveElementCache.kt:178)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.resolveToElements(ResolveElementCache.kt:222)
at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl.analyze(ModuleResolutionFacadeImpl.kt:59)
at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl.analyze(ModuleResolutionFacadeImpl.kt:53)
at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeWithDebugInfo.analyze(ResolutionFacadeWithDebugInfo.kt:38)
... 25 more
What could be the reason for this?
File -> Invalidate Caches did the trick for me
Related
Every time my gradle is syncing it gets errors like this. Can someone help me?
Error cause after adding firebase_ml_vision dependency.
Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
Caused by: java.lang.RuntimeException: com.android.build.gradle.internal.crash.ExternalApiUsageException: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':app:packLibsflutterBuildDebug'.
Caused by: com.android.build.gradle.internal.crash.ExternalApiUsageException: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':app:packLibsflutterBuildDebug'.
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':app:packLibsflutterBuildDebug'.
org.codehaus.groovy.runtime.metaclass.MissingMethodExecutionFailed: No signature of method: org.gradle.api.tasks.bundling.Jar.destinationDir() is applicable for argument types: (File) values: [C:\Users\37499\AndroidStudioProjects\flutter_ml_demo\build\app\intermediates\flutter\debug]
I tried changing gradle, java and firebase versions but that don't help.
How can I resolve this error, I get this after upgrading my kotlin to 1.6.10
Is there any concrete way resolve this
Caused by: java.lang.IllegalStateException: Could not parse metadata! This should only happen if you're using Kotlin <1.1.
at com.squareup.moshi.kotlinpoet.metadata.KotlinPoetMetadata.readKotlinClassMetadata(KotlinPoetMetadata.kt:83)
at com.squareup.moshi.kotlinpoet.metadata.KotlinPoetMetadata.toImmutableKmClass(KotlinPoetMetadata.kt:113)
at com.squareup.moshi.kotlin.codegen.MoshiCachedClassInspector.toImmutableKmClass(MoshiCachedClassInspector.kt:37)
at com.squareup.moshi.kotlin.codegen.MetadataKt.targetType(metadata.kt:137)
at com.squareup.moshi.kotlin.codegen.JsonClassCodegenProcessor.adapterGenerator(JsonClassCodegenProcessor.kt:148)
at com.squareup.moshi.kotlin.codegen.JsonClassCodegenProcessor.process(JsonClassCodegenProcessor.kt:114)
at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt:90)
at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:188)
I am trying to generate Jacoco XML reports for this Android project. I am using the gradle-android-junit-jacoco-plugin version 0.16.0 (latest as of today).
When I run the jacocoTestReportMerged task it fails with the following error:
Caused by: java.io.IOException: Error while analyzing XmlPullParsers.class.
at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:170)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:142)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:165)
at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:201)
at org.jacoco.ant.ReportTask.createBundle(ReportTask.java:570)
at org.jacoco.ant.ReportTask.createReport(ReportTask.java:542)
at org.jacoco.ant.ReportTask.execute(ReportTask.java:495)
... 210 more
Caused by: java.lang.IllegalStateException: Can't add different class with same name:
info/metadude/android/eventfahrplan/network/serialization/XmlPullParsers
at org.jacoco.core.analysis.CoverageBuilder.visitCoverage(CoverageBuilder.java:107)
at org.jacoco.core.analysis.Analyzer$1.visitEnd(Analyzer.java:98)
at org.objectweb.asm.ClassVisitor.visitEnd(ClassVisitor.java:338)
at org.jacoco.core.internal.flow.ClassProbesAdapter.visitEnd(ClassProbesAdapter.java:98)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:683)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:391)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:124)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:140)
... 215 more
I started configuring exclude rules such as ...
junitJacoco {
excludes = [
"**/XmlPullParsers.*"
]
}
... but then the task fails at the next file - so this does not seem to be the correct way.
I also tried 0.17.0-SNAPSHOT and version prior to 0.16.0, without success though. Gradle 6.3 is used in this project.
How can I configure the Gradle plugin for my project?
After migrating to Android Studio 3.4, the game now crashed. It works fine on 3.3. What does this mean?
org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures.
at
Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':android:transformDexWithInstantRunSlicesApkForDebug'
...
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: /Users/limtc/AndroidStudioProjects/Space War/android/build/intermediates/instant_run_split_apk_resources/debug/instantRunSplitApkResourcesDebug/out/slice_1/resources_ap
,,,
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: /Users/limtc/AndroidStudioProjects/Space War/android/build/intermediates/instant_run_split_apk_resources/debug/instantRunSplitApkResourcesDebug/out/slice_1/resources_ap
...
Caused by: java.io.FileNotFoundException: /Users/limtc/AndroidStudioProjects/Space War/android/build/intermediates/instant_run_split_apk_resources/debug/instantRunSplitApkResourcesDebug/out/slice_1/resources_ap
...
After switching off instant run, I can now deploy to phone! But trying to generate bundle I now have:
org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures.
...
Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':android:lintVitalRelease'
...
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':android:lintClassPath'.
...
Caused by: org.gradle.internal.resolve.ArtifactResolveException: Could not download groovy-all.jar
Maybe now something goes offline? Thanks!
Based on the messages:
java.io.FileNotFoundException: /.../instant_run_split_apk_resources
I'd say, try disabling Instant Run.
I am developing my android App with MongoDB Stitch, which has a pre-requisite that I need to install MongoDB Mobile Tarball.Installation Structure
After installation I run the program, getting this exception:
08-09 13:01:34.308 20251-20278/? E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: io.datats.datatungshing.app, PID: 20251
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:354)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.mongodb.embedded.client.MongoClientEmbeddedException: Failed to load the mongodb library: 'mongo_embedded_capi'.
Native library (com/sun/jna/android-x86/libjnidispatch.so) not found in resource path (.)
Please set the library location by either:
- Adding it to the classpath.
- Setting 'jna.library.path' system property
- Configuring it in the 'MongoEmbeddedSettings.builder().libraryPath' method.
at com.mongodb.embedded.client.MongoDBCAPIHelper.init(MongoDBCAPIHelper.java:60)
at com.mongodb.embedded.client.MongoClients.init(MongoClients.java:38)
at com.mongodb.stitch.core.services.mongodb.local.internal.CoreLocalMongoDbService.getClient(CoreLocalMongoDbService.java:36)
at com.mongodb.stitch.android.services.mongodb.local.LocalMongoDbService.access$000(LocalMongoDbService.java:35)
at com.mongodb.stitch.android.services.mongodb.local.LocalMongoDbService$1.getClient(LocalMongoDbService.java:50)
at com.mongodb.stitch.android.services.mongodb.local.LocalMongoDbService$1.getClient(LocalMongoDbService.java:41)
at com.mongodb.stitch.android.core.internal.StitchAppClientImpl.getServiceClient(StitchAppClientImpl.java:105)
at io.datats.datatungshing.forboledts.SecondActivity$getTrendFromDB.doInBackground(SecondActivity.java:57)
at io.datats.datatungshing.forboledts.SecondActivity$getTrendFromDB.doInBackground(SecondActivity.java:37)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 4 more
Caused by: java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/android-x86/libjnidispatch.so) not found in resource path (.)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:962)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922)
at com.sun.jna.Native.<clinit>(Native.java:190)
at com.sun.jna.Native.loadLibrary(Native.java:544)
at com.mongodb.embedded.client.MongoDBCAPIHelper.init(MongoDBCAPIHelper.java:58)
... 14 more
The highlighted code is in my AsyncTask, which is just creating a MongoClient in my java program:
final StitchAppClient client =
Stitch.initializeDefaultAppClient("APP-ID");
final MongoClient mobileClient =
client.getServiceClient(LocalMongoDbService.clientFactory);
MongoCollection<Document> localCollection =
mobileClient.getDatabase(databaseName).getCollection("CollectionName");
/*Document doc = localCollection.find().first();
this.keywordList = (List<String>) doc.get("list");*/
return true;
I have also created and included a jniLibs directory in my src/main/, which contains the following components:
jniLibs
In my jniLibs I also have the file libjnidispatch.io included. Please help me on this strange bug. The emulator I used is Nexus 6 API 28. Thank you!!!