Search code examples
androidandroid-studioandroid-sdk-toolsbuild.gradlegoogle-license-manager

Setting Up the Licensing Verification Library on Android Studio


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:

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;

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.

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

Thanks Lorenzo


Solution

  • 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.