Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to clean project in Android Studio

OS version: Ubuntu 14.04 LTE 64 Bit

Java JRE/JDK version: Oracle JDK 1.8.0_11

Project directory is on a NTFS based drive.

Whenever I try to clean my project I get something like below.

:app:clean FAILED Error:Execution failed for task ':app:clean'.

Unable to delete file: /media/DriveA/AndroidStudioWorkspace/DNA/app/build/intermediates/classes/debug/.../mechandising/MerchandizingActivity$3.class

When I try to delete the build folder manually I get the following error.

Error when getting information for file '/media/DriveA/AndroidStudioWorkspace/DNA/app/build/intermediates/pre-dexed': Input/output error

I am unable to figure out whether its a Linux problem or a Studio problem. I don't face such a problem in Eclipse (Same Drive) so I am just considering it to be something wrong with my studio.

Any Suggestions??

like image 972
iZBasit Avatar asked Jul 31 '14 05:07

iZBasit


People also ask

How do I clean my Android project?

Clear your project directory Obviously, try to clean your project from android studio : “Build -> Clean Project”. This will clear your build folders. Clear the cache of Android Studio using “File -> Invalidate Caches / Restart” choose “Invalidate and restart option” and close Android Studio.

How do you clean a project?

Manually delete the [project]/. gradle as hidden folder as that one is the main culprit for large cleaned projects sizes. and don't forget to manually delete the [project]/. gradle hidden folder as that one is the main culprit for large cleaned projects sizes.

What happens when you clean a project in Android Studio?

Cleaning an Android project simply deletes the build directory. It removes the . class files that are generated when you compile your project and then recompiles again.

How do I delete a project in Android Studio?

In the Android Studio welcome screen, click on the project name and select Remove From List. Select File > Open Recent > Manage Projects, select the project, and press the delete key or click the X that's displayed on it.


1 Answers

I had the same problem.

You need to go to the source file directly. Close the studio and go to the path the issue is located at and delete the folder there.

like image 101
Kevin Wiggins Avatar answered Oct 16 '22 10:10

Kevin Wiggins