3

I was following this guide : https://developer.android.com/google/play/expansion-files.html

and in my downloaderService.java file it can't resolve to extends DownloaderService :

public class downloaderService extends DownloaderService {

Why and how to fix it? another file can't resolve DownloaderClientMarshaller at alarmReceiver.java :

..  DownloaderClientMarshaller.startDownloadServiceIfRequired(context,
                    intent, downloaderService.class);  .....

Thank you for your answers

Azhar
  • 329
  • 1
  • 4
  • 17

2 Answers2

1

Google tutorial not worked for me, and neither this one: https://kitefaster.com/2017/02/15/expansion-apk-files-android-studio/

Because after import the libraries I had the same problem that you.

But adding dependencies in gradle worked for me. For that you have to add in your app build.gradle this lines:

android{
     [...]
     repositories {
         maven { url 'https://dl.bintray.com/alexeydanilov/apk-expansion'}
     }
}

dependencies {
      compile 'com.danikula.expansion:expansion:1.3.4'
      compile 'com.danikula.expansion:license:1.7.0'
      compile 'com.danikula.expansion:zip:1.2.1'
}

As you can see here: https://github.com/danikula/Google-Play-Expansion-File

And finally android studio finds vending library and DownloaderService and DownloaderClientMarshaller classes.

Hope this answer help you :)

AliMola
  • 578
  • 8
  • 17
  • I'm having the same problem. But I don't understand why they're being hosted at that other different domain. – kriztho Jan 31 '19 at 22:17
0

You need to add following libraries as modules to your project:

  • Google Play Licencing Library package
  • Google Play APK Expansion Library package

as described here in the android developers website

Julian Raj
  • 62
  • 2