0

I'm getting this error:

Cannot resolve symbol DrawerLayout

I followed solution from this question and I still have the same error...

Cannot resolve symbol DrawerLayout

Community
  • 1
  • 1
jdicarreira
  • 159
  • 2
  • 13

1 Answers1

2

Cant import DrawerLayout from android-support-v13

That's because the DrawerLayout isn't in the v13 support library - it's in the v4 support library.

The answer with the most votes in the question you link to is actually incorrect with its advice when it says "Select latest version folder, i.e. v13".

The versions v4, v7 & v13 don't represent the versions of the libraries themselves - they indicate which version of Android each one supports back to.

In other words the v4 support library adds newer functionality to devices running API 4 (Android v1.6) onwards, the v7 library adds newer functionality to devices running API 7 (Android v2.1) onwards and v13 adds functionality to devices running API 13 (Android 3.2) onwards.

You need the v4 support library - not the v13 support library.

Squonk
  • 48,735
  • 19
  • 103
  • 135
  • Thanks!! But now I'm getting this error: Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1 – jdicarreira Aug 12 '14 at 13:40
  • @jdicarreira : That sort of error is a completely different issue. I hadn't realised you were using the L preview (haven't tried it myself). I suggest you start a new question and maybe other L previewers can help you out. – Squonk Aug 12 '14 at 13:49
  • But I'm not using the Android L, I setup the min sdk as 4.0... – jdicarreira Aug 12 '14 at 13:59
  • @jdicarreira : Check out this question and it's answer. http://stackoverflow.com/questions/24438170/manifest-merger-failed-uses-sdkminsdkversion-14 – Squonk Aug 13 '14 at 09:00