在 Android Studio 上设置许可验证库 [英] Setting Up the Licensing Verification Library on Android Studio

查看:28
本文介绍了在 Android Studio 上设置许可验证库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Android Studio 制作的应用中实施 Google 许可验证.按照以下几行:http://developer.android.com/google/play/licensing/setting-up.html 似乎是:

im'triyng to implement the Google Licensing Verification in a Android Studio made app. By following this lines: http://developer.android.com/google/play/licensing/setting-up.html seems tath:

作为将 LVL 添加为库项目的替代方法,您可以将库源直接复制到您的应用程序中.为此,请将 LVL 的 library/src/com 目录复制(或导入)到应用程序的 src/目录中.

As an alternative to adding the LVL as a library project, you can copy the library sources directly into your application. To do so, copy (or import) the LVL's library/src/com directory into your application's src/ directory.

我已经这样做了,但导入了:

I've done this but the import of:

import com.google.android.vending.licensing.LicenseChecker;
import com.google.android.vending.licensing.LicenseCheckerCallback;

失败..在 google 上搜索我发现我需要修改项目中的 build.grade 文件,但我找不到具体的解决方案.

fail.. Searching on google i've been noticed that i need to modify the build.grade file on my project, but i can't find a specific solution.

如何在我的 android studio 项目中引用 LVL?有一些教程或例子吗?

How can I reference the LVL in my android studio project? There is some tutorial or example?

谢谢洛伦佐

推荐答案

我终于找到了解决方案!您必须将 library/src/com 目录放在 yiroject/scr/main/java/com 中,然后单击Sync project with Gradle files"按钮.

Finally I've got the solution! You have to put the library/src/com directories in the youroject/scr/main/java/com and then click on the "Sync project with Gradle files" button.

这篇关于在 Android Studio 上设置许可验证库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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