我不知道如何将 Downloader Library 和 Licensing Library 添加到 Android Studio [英] I can't figure out how to add Downloader Library and Licensing Library to Android Studio

查看:17
本文介绍了我不知道如何将 Downloader Library 和 Licensing Library 添加到 Android Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Google 的下载库应用程序许可服务,因为我的应用程序将使用 APK 扩展.但问题是我不知道如何将这 2 个库添加到 Android Studio.我总是通过 File -> Import Module 将库导入 Android Studio,然后我选择它.

I'm trying to use Google's Downloader Library and Application Licensing Service since my app is going to use APK Expansion. But the problem is I don't know how to add those 2 libraries to Android Studio. I always import libraries to Android Studio by File -> Import Module and then I select it.

但是当我这次这样做时,它说:

But when I do that this time, it says:

选择要导入的模块

即使在我已经选择了下载程序库或许可库之后.

Even after I've already selected the Downloader Library or Licensing Library.

我还尝试通过将目录复制到我的应用程序目录然后将它们包含在 gradle 依赖项中来导入它们,但这也不起作用.

I also tried importing them by copying the directories to my app directory and then including them in gradle dependencies but that doesn't work either.

有人可以指导我将这 2 个库添加到我的 Android Studio 中,因为我似乎无法弄清楚.

Could someone walk me through adding these 2 libraries to my Android Studio because I can't seem to figure it out.

推荐答案

我以一种非常奇怪的方式解决了这个问题.

I solved the problem in a very weird way.

我注意到我无法将这 2 个库直接导入 Android Studio,因为它们缺少很多项目文件,因此 Android Studio 无法将它们识别为库.

I noticed that I can't import those 2 libraries directly to Android Studio because they are missing a lot of project files and therefore Android Studio doesn't recognize them as libraries.

然后我将这两个库都导入到 Eclipse 中,以便生成所有必要的内容,然后将它们直接导出到 Android Studio.

I then imported both libraries to Eclipse so that everything neccessary was generated and then exported them directly to Android Studio.

这很有效.

也许是一种奇怪的导入库的方式,但至少它有效.

Maybe a weird way to import a library but at least it worked.

这篇关于我不知道如何将 Downloader Library 和 Licensing Library 添加到 Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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