Ysp
Ysp

Reputation: 312

update failed java.io.FileNotFoundException

i updated my ide to letest version after update i opend project on which i was working before update but it gave error but when i opend other projects there had no error please help Thank you

update failed for AnAction(com.intellij.execution.ExecutorRegistryImpl$ExecutorAction) with ID=Run
java.io.FileNotFoundException: E:\Android\WhatsApp\app\build\intermediates\apk_ide_redirect_file\debug\..\..\apk\debug\output-metadata.json (The system cannot find the file specified)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
    at java.base/java.io.FileReader.<init>(FileReader.java:75)

Upvotes: 7

Views: 15602

Answers (5)

MapleDeveloper
MapleDeveloper

Reputation: 21

In my case, I was unable to Clean Project as well as Sync Gradle Files, So Eventually I was about to give up, but then I went to
AndroidStudioProjects/project_name/app/build/intermediates/apk_ide_redirect_file/debug in the file explorer and found a file named redirect
That file contained the following information

#- File Locator -
listingFile=../../apk/debug/output-metadata.json

From here, I tried to locate the path mentioned in this file and I was unable to find it
So I searched output-metadata in the file explorer from AndroidStudioProjects/project_name and I found a bunch of output-metadata files, I copied the first one and pasted it in the mentioned location, and then everything worked perfectly

Now I don't know wether this is the right way to solve this or not, but it worked...
Hope it helps you...

Upvotes: 1

  1. Open your project.
  2. If your project files are not loaded and instead you see: 'Loading...' cancel Sync Gradle by clicking on X at the bottom, this should show your files back.
  3. Clean Project: Build -> Clean Project
  4. Rebuild Project: Build -> Rebuild Project

Upvotes: 0

mabi
mabi

Reputation: 564

Workaround: if you encounter this error generating an APK, first clean the project (Build -> Clean project)

Upvotes: 0

GvHarish
GvHarish

Reputation: 376

just clean project and make a build

Upvotes: 15

Ysp
Ysp

Reputation: 312

It is solved by just rebuild project Build → Rebuild project

Upvotes: 6

Related Questions