4

Error Image

I am getting the error that is pictured above when I try to build my project in Android Studio.

The file that is mentioned in the error does not exist in that folder. I tried to delete the entire folder hoping it would re-download the needed file. It did re-download the folder but again it did not have that file.

I am not using this file anywhere in my project and as far as I know.

Any help would be greatly appreciated.

Thanks.

FidelCashflo
  • 513
  • 2
  • 10
  • 23

2 Answers2

9

Maybe the path of file is too long that it is unable to process it. In my case, it was:

C:\Users\ber$erk-kAjU\Downloads\Compressed\android-xmpp-asmack-sample-master\android-xmpp-asmack-sample-master\XMPPAsmackSample\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-ldrtl-xxhdp

As you can see, it is huge! I just moved my project to another path, and reduced it to:

D:\AndroidStudioWorkspace\XMPPAsmackSample\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-ldrtl-xxhdp

Maybe this can help!

berserk
  • 2,690
  • 3
  • 32
  • 63
1

Use

Build > Clean Project

To clean the build directory.

I think you are using AppCompat library in your build.gradle file

dependencies {
    compile 'com.android.support:appcompat-v7:+'
}

In order to use any support library in dependency make sure you have downloaded Android Support Repository from SDK manager

Support Repository

After downloading the repository, do sync the project with gradle using tiny gradle button available in toolbar.

After sync completion you will be able to see mentioned png file in directory as shown :

enter image description here

Inside the directory.

EDIT :

If still doesn't solve check the whether your sdk pointing to right sdk from File > Project Structure > Android SDK

Also check this Import Google Play Services library in Android Studio for AppCompat Library

If there is some issue make it correct ans sync project with gradle.

Community
  • 1
  • 1
Piyush Agarwal
  • 25,608
  • 8
  • 98
  • 111
  • Thanks for the response! I tried what you said, and it is still giving me the same error. The file is still not there. Here is what my build.gradel looks like: [link]http://d.pr/i/zBm5 And I think this might be related: I am also getting a bunch of errors saying "Cannot resolve method" even though the methods are clearly present. – FidelCashflo Jan 20 '14 at 00:39
  • Thanks for the update! I managed to fix a couple of things with the link you provided. Now, I am getting this error: http://d.pr/i/6Gu9 This is what my Project Structure looks like: http://d.pr/i/5Ge7 Thanks for the help! – FidelCashflo Jan 20 '14 at 05:43
  • Check you local.properties file in root directory and make sure this is also pointing so the same sdk using `sdk.dir` . With AS 0.3.7 release while syncing with gradle studio will prompt you for auto fix. Check this http://tools.android.com/recent/androidstudio037released – Piyush Agarwal Jan 20 '14 at 07:16