Android Studio:新添加的模块未显示在项目结构窗口中

问题描述

我正在尝试将 UnityAds 集成到我的 Android Studio 项目中。

对于那个 unity-ads.aar 包需要作为模块添加,在后面的部分中,该模块必须作为依赖项添加

我已成功将 unity-ads.aar添加module,但是当我转到 Project Structure-> Dependencies 时。 unity-ads 下方没有 <All Modules>。仅存在 app 模块。

根据文档,unity-ads 应该出现在那个窗口上,我可以从那里将 unity-ads 添加为我的项目中的 dependency

This picture will help to understand the problem

可能是什么问题????

如何将该模块作为依赖项添加到我的项目中???

解决方法

在您的应用中添加 unity-ads.aar 模块。

Download latest version here

下载后将其解压缩到任何您想要的位置。

打开你的项目。 转到文件 -> 项目结构 -> 依赖项(添加新依赖项)enter image description here

选择导入 jar/aar 包。 enter image description here

给出 unity-ads.aar 文件的路径。 点击确定,你就完成了。

,

打开 settings.gradle 并添加缺少的行:

include :unity-ads3.7.1