gridle corrupted error in android studio during build - android-studio

Caused by: org.gradle.cache.internal.btree.CorruptedCacheException: Corrupted IndexBlock 116333 found in cache 'C:\Users\zulqa.gradle\caches\journal-1\file-access.bin'.

Related

Error in Android Studio: Manifest merger failed with multiple errors

Screenshot of Android Studio
How do I resolve the an error in Android Studio as below: Caused by: java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs.
I have attached an Image with my question please see it once and Help me resolve my error.
Check your gradle files. I would suggest you to create new project and copy content in gradle to existing project and add required dependencies. Error is usually caused by incompatible version of java. Download latest Android studio and set jdk to java 17.
Check this link

Why does Android Studio Arctic Fox fail to sync my project

Android Studio Arctic fox 2020.3.1 Patch 2 fails with th following error in idea.log:
ERROR - intellij.openapi.progress.Task - java.lang.IllegalStateException: Can't resolve library via LibraryId(name=Gradle: com.google.j2objc:j2objc-annotations:1.3, tableId=com.intellij.workspaceModel.storage.bridgeEntities.LibraryTableId$ProjectLibraryTableId#4b9d4a4e)
java.lang.RuntimeException: java.lang.IllegalStateException: Can't resolve library via LibraryId(name=Gradle: com.google.j2objc:j2objc-annotations:1.3, tableId=com.intellij.workspaceModel.storage.bridgeEntities.LibraryTableId$ProjectLibraryTableId#4b9d4a4e)
I have a suspicion that the concrete lib in question is a bit random. Before I upgraded from Patch 1 to Patch 2, the error said:
Caused by: java.lang.IllegalStateException: Can't resolve library via LibraryId(name=Gradle: androidx.exifinterface:exifinterface:1.0.0#aar, tableId=com.intellij.workspaceModel.storage.bridgeEntities.LibraryTableId$ProjectLibraryTableId#73f6fd09)
Gradle syncs just fine - the sync finishes with BUILD SUCCESSFUL in 5s . It's definitely Android studio that is the problem. Any Idea?
File > Invalidate Cache and Restart solved the problem

Unable to update from android studio 3.1.4 to 3.4.1

I am trying to update android studio from 3.1.4 to 3.4.1 it showing below error while patch:
ERROR Patch.apply - apply failed
java.io.IOException: Impossibile trovare il file specificato
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:233)
at com.intellij.updater.Utils.copyStream(Utils.java:237)
at ie.wombat.jbdiff.JBPatch.realAllFileContent(JBPatch.java:141)
at ie.wombat.jbdiff.JBPatch.bspatch(JBPatch.java:67)
at
com.intellij.updater.DiffAlgorithm$JBDiffAlgorithm.applyDiff
(DiffAlgorithm.java:118)
at
com.intellij.updater.BaseUpdateAction.applyDiff(BaseUpdateAction.java:145)
at com.intellij.updater.UpdateAction.doApply(UpdateAction.java:55)
at com.intellij.updater.PatchAction.apply(PatchAction.java:199)
at com.intellij.updater.Patch.lambda$apply$3(Patch.java:399)
at com.intellij.updater.Patch.forEach(Patch.java:471)
at com.intellij.updater.Patch.apply(Patch.java:390)
at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:64)
at com.intellij.updater.Runner.install(Runner.java:357)
at com.intellij.updater.Runner.main(Runner.java:131)
any clue?
as pointed by #Gabriele Mariotti invalidate cache and restart seems, in the second try, to resolve the problem

Android Studio Cannot find Android Studio project files

I was given a sample code from a factory and said that it was created using Android Studio. But whenever I try to build, it says that cannot find the project files, and asked me to perform a full rebuild.
I have tried numerous suggestions given on the net (mostly outdated), but can't figure out what was missing.
Error:Internal error: (java.io.IOException) Cannot find Android Studio project files at C:/Factory
java.io.IOException: Cannot find Android Studio project files at C:/Factory
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:96)
at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:42)
at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:50)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:79)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:281)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:137)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:235)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
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)
Please perform full project rebuild (Build | Rebuild Project)

Android Studio crashes on startup

First time to Android Studio. I installed JDK and set up the environment variables. When running studio.exe or studio64.exe on the first time, the first screen flashes for a second and then I get the following error:
/*
Internal error. Please report to http://code.google.com/p/android/issues
com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.reflect.InvocationTargetException
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:93)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:90)
... 1 more
Caused by: java.lang.ExceptionInInitializerError
at com.intellij.openapi.application.impl.ApplicationInfoImpl.getBuild(ApplicationInfoImpl.java:189)
at com.intellij.idea.StartupUtil.startLogging(StartupUtil.java:300)
at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:106)
at com.intellij.idea.MainImpl.start(MainImpl.java:33)
... 6 more
Caused by: java.lang.RuntimeException: Invalid version number: PK
*/
As per the comment here by Studio's team member, It happens because of corrupted Installation
https://code.google.com/p/android/issues/detail?id=60178
Comment by Android Studio's Team Member
I think it's coincidence that it started working again -- nothing
you're doing in your code should cause this sort of crash in Studio.
It still feels like a corrupted install or something strange going on
in your environment. That magic number exception means a jar that's
part of Android Studio is getting scrambled.
I suggest you to try fresh Installation or, As it happens because of some internal Intellij's libraries problem.

Resources