5

This issue started after I updated Android Studio from 2.1.2 to 2.3.3, with an existing RenderScript project. The error message I get is:

Error:Execution failed for task ':app:mergeDebugResources'.
Error: java.io.FileNotFoundException: C:\< project location > \app\build\generated\res\rs\debug\raw\bc64 (Access is denied)

The project is from Android Studio 2.1.2 and later opened by 2.3.3. There is no prompt of an incorrect version number, so it should work fine. But now I cannot Run/Debug app to a mobile device.

When I tried creating a new blank screen project with RenderScript enabled, it was able to run/debug.

How to solve?

Mr-IDE
  • 7,051
  • 1
  • 53
  • 59
vims liu
  • 643
  • 1
  • 9
  • 20

3 Answers3

3

Has same problem, added to Graddle configuration:

android{
    ...
    defaultConfig{
        ...
        renderscriptTargetApi 21
    }
}
Pavlus
  • 1,651
  • 1
  • 13
  • 24
1

This issue can also happen when installing between different Android OS versions. Doing Build -> Clean may not resolve the problem. So just manually delete the folder 'bc64' at the path specified in the error message, then press Run. That should work, and it will regenerate the folder and files.

This will also fix the following similar issue:

Error: java.io.FileNotFoundException: /Users/username/AndroidApp/app/build/generated/res/rs/debug/raw/bc64 (Is a directory)

There are 2 ways you can delete the folder from within Android Studio:

  1. View -> Tool Windows -> Terminal -> rm -rf app/build/generated/res/rs/debug/raw/bc64
  2. View -> Tool Windows -> Project -> navigate to the bc64 folder -> right-click -> delete
Mr-IDE
  • 7,051
  • 1
  • 53
  • 59
0

I was facing the same issue.

File -> Invalidate Cache and Restart fixed the issue for me.

It does the same thing as mentioned by Mr. IDE but it's a lot convenient to do this way instead of locating the folder and deleting it.

rsd_unleashed
  • 151
  • 2
  • 12