update failed java.io.FileNotFoundException
Asked Answered
W

5

7

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)
Wasp answered 26/2, 2022 at 5:21 Comment(0)
P
15

just clean project and make a build

Prissy answered 26/2, 2022 at 10:9 Comment(0)
W
6

It is solved by just rebuild project Build → Rebuild project

Wasp answered 26/2, 2022 at 8:7 Comment(0)
D
1

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...

Drugstore answered 2/10, 2022 at 6:8 Comment(0)
N
0

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

Nuncle answered 28/2, 2022 at 13:35 Comment(0)
M
0
  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
Monti answered 17/6, 2022 at 21:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.