Android Studio 不允许我导入 SDK [英] Android Studio won't let me import SDK

查看:42
本文介绍了Android Studio 不允许我导入 SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图关注这篇文章 将 mopub SDK 导入我的应用程序,但是 Android Studio 很困难.

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

我解压了 SDK,然后在 Project Structure 中选择了 import a New Module.当我选择解压后的文件夹时,完成按钮变灰,并且出现选择要导入的模块"的错误

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'

我使用的是 Android Studio 0.8.6 版.这是错误菜单的截图

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

推荐答案

我遇到了同样的问题,所以我不得不手动安装.

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

首先,解压下载的文件,然后将解压后的mopub-sdk文件夹复制到你的项目目录中.

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

接下来,打开项目的 settings.gradle 文件并确保 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'

打开您应用的 build.gradle 文件(不是您的主项目)并将 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')
}

这些说明基于 mopub github 上的说明.

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

这篇关于Android Studio 不允许我导入 SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆