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
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?!
I solved the problem in a very weird way.
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.
I then imported both libraries to Eclipse so that everything neccessary was generated and then exported them directly to Android Studio.
That worked like a charm.
Maybe a weird way to import a library but at least it worked.
When I tried to import library, I met same issue, and I could resolve by adding 'include ':library-directory-name'
I just wanted to add a comment that the .project file for downloader should point to correct dependency:
android.library.reference.1=../../market_licensing/library
Now importing downloader will also import licensing which depends and create the correct dependency.
EDIT: That libraries are rather old. I've found new versions here:
https://github.com/google/play-apk-expansion
https://github.com/google/play-licensing