Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't figure out how to add Downloader Library and Licensing Library to 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:

Select modules to import

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

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.

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

like image 693
Guy Avatar asked Aug 16 '14 18:08

Guy


1 Answers

For anyone else coming along with similar problem.

I solved it by importing module (File->New->Import Module) and selecting the licensing and the downloader library folders each time.

Note however that the .project file for downloader has a line that throws Android off (correctly):

android.library.reference.1=../market_licensing

Remove this line and the module imports fine.

Thank you Google once again for your clear instructions and clean environment!!!

BTW: What the heck are they writing in their guide http://developer.android.com/google/play/expansion-files.html#AboutLibraries

"Select the Properties tab and in Library Repository, enter the library from the /extras/google/ directory (play_licensing/ for the License Verification Library or play_apk_expansion/downloader_library/ for the Downloader Library)."

Does that even make any sense to anyone?!

like image 68
George Avatar answered Nov 08 '22 22:11

George