user2055654
user2055654

Reputation:

Android Studio won't let me import SDK

I was trying to follow this post to import the mopub SDK into my app, however Android Studio is being difficult.

I unzipped the SDK, and went to Project Structure to select import a New Module. When I chose the unzipped folder, the Finish button is grayed out, and there is an error saying 'Select Modules to import'

I am using Android Studio version 0.8.6. Here is a screenshot of the error menu

Upvotes: 5

Views: 5340

Answers (3)

Cuong Nguyen
Cuong Nguyen

Reputation: 1176

It's not fault of AndroidStudio, just try archived sdk, it works

https://github.com/mopub/mopub-android-sdk/archive/v3.9.0.zip

from https://github.com/mopub/mopub-android-sdk/releases

// sorry I don't enough reputation to post image

Upvotes: 1

Vyshnavi
Vyshnavi

Reputation: 338

In eclipse, if we create a project which is having library projects inside our project, then

enter image description here

we cannot import this project as module in Android studio. This may be the issue

enter image description here

Upvotes: 4

Joel
Joel

Reputation: 15051

I had the same issue so I had to install it manually.

First, unzip the downloaded file and then copy the unzipped mopub-sdk folder into your project directory.

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 app's build.gradle file (not your main project one) and add the MoPub SDK as a dependency:

dependencies {
    compile project(':mopub-sdk')
}

These instructions are based of those found on the mopub github.

Upvotes: 8

Related Questions