I had a similar problem. I followed these steps mentioned here and it worked
Do a sync once you modified the build.gradle file. Then the module should appear in your workspace.
Gradle Integration
Adding as Source
To include the MoPub SDK as source in your project, copy the SDK source into your project as a module. To do this on OS X and Linux, do the following:
$MY_PROJECT_DIR $ mkdir mopub-sdk
$MY_PROJECT_DIR $ cp -R $MOPUB_DIR/mopub-android-sdk/mopub-sdk mopub-sdk
Next, open your project's settings.gradle file and make sure the MoPub SDK is included as a module:
include ':app', ':mopub-sdk'
Open your project's build.gradle file and add the MoPub SDK as a dependency:
dependencies {
compile project(':mopub-sdk')
}