Android Studio won't let me import SDK

北城以北 提交于 2019-12-17 19:52:23

问题


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


回答1:


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.




回答2:


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

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




回答3:


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



来源:https://stackoverflow.com/questions/26734779/android-studio-wont-let-me-import-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!