Maybe Android studio has updated, I couldn't solve it according to abaar or pyus13's answer.
This answer is based on Android Studio 0.6.1.
Unzip the
mopub-sdk.zip
that you downloadedOpen project structure(File -> Project Structure) in Android Studio
Click the '+' button on the upper left to add a new module
You can see the New Module wizzard, choose Import Existing Project and click next
Choose the mopub-sdk folder you just unzipped
Click next and finish. Now you can see that Android Studio import the mopub-sdk into your project. And a
settings.gradle
file has been added into your projectOpen
settings.gradle
, and add a lineinclude ':'
Open the
build.gradle
file of your project, in the dependencies entry, addcompile project('mopubsdk')
(mopubsdk is the project name you just added)Open project structure again, you can see the
mopubsdk
module on the left, click on it, then chooseDependencies
tab on the top, changecom.android.support:support-v4:+
's scope fromCompile
toProvided
Now it's done. It works for me.