I am attempting to add a directory as a dependency in Android Studio(GameBaseUtils). I have seen other SO answers simply posting the correct gradle configuration for their particular issue, however I don't understand how I can adapt their answers to my situation.

Here is what I did:

Step one: File-> Import Module ->Navigate to directory and select it.

Step Two-: File-> Project Structure-> Modules-> Select my application->Dependencies->Add the module as a dependency to my project.

Now my code doesn't have any red lines indicating an error importing the module. However when I select build I get the following errors:

Gradle: package com.google.example.games.basegameutils does not exist
Gradle: cannot find symbol class BaseGameActivity
Gradle: cannot find symbol variable super
...

Here is the build.gradle file for my application

buildscript {
repositories {
    mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'

dependencies {
compile files('libs/android-support-v4.jar')
}

android {
compileSdkVersion 17
buildToolsVersion "17.0.0"

defaultConfig {
    minSdkVersion 8
    targetSdkVersion 17
}
}

How can I correctly import this external library and can you please explain how and why your solution works?

Edit
Report