Please consider the following code
dependencies {
compile fileTree(dir: \'libs\', include: [\'*.jar\'])
androidTestCompile(\'com.android.support.test.es
Follow the Steps
Step 1: Open Project Structure (Ctrl+Alt+ Shift+S)
Step 2: Tap app menu
Step 3: Tap Dependencies option
Step 4: click + menu to add "library dependency"
Step 5: Type the keywords for your dependency
Step 6: Click Search icon
Step 7: Double Click the dependency that found in Search,
Dependency Added...!
[