1

We are preparing to publish instant app apks to play store via "Instant app development" channel for testing purpose. When we sign instant app (using same keystore used for Installed App), only geting one feature module apk inside zip folder(instant-release.zip) which giving error while uploading to Play Store by complaining "Your Instant App APKs should contain at least one base APK"

Anyway we able to see the expected structure under instant-debug version

Structure deference between debug and release version as below

instant-debug.zip

  • hello-debug.apk
  • base-debug.apk
  • bye-debug.apk

instant-release.zip

  • hello-release.apk

And not sure whether we making any mistake on gradle configuration. It will very helpful if anyone can advise on this ?

Thana
  • 33
  • 6
  • You may need to post your gradle files and your build command to help troubleshoot this. How are you building your release? Via Studio menus or via command line assembleRelease? – AdamK Jun 05 '17 at 04:12
  • Thanks @AdamK , we trying out the google sample https://github.com/googlesamples/android-instant-apps/tree/master/hello-feature-module and gradle structure same as this. Also we signing the instant build via Android Studio 3.0 menu. – Thana Jun 05 '17 at 06:03
  • There are some known issues signing using the menus in Android Studio. Can you try setting up signingConfigs in your build.gradles and then running assembleRelease from command line or from the gradle menu in Studio (one on the right side). Here's some info on setting up signingConfigs: https://developer.android.com/studio/publish/app-signing.html#secure-shared-keystore – AdamK Jun 05 '17 at 06:08
  • You are right @AdamK, we able to generate instant-release.zip with the expected structure using signingConfigs and assembleRelease command. Seems Installed app signing works with android studio menu and Instant app signing not working with that. Thanks for the help. – Thana Jun 05 '17 at 07:30
  • Glad it worked. I just copied my comment to an answer below in case others run into the same issue. – AdamK Jun 05 '17 at 11:12

2 Answers2

2

There are some known issues signing Instant Apps using the built-in menus in Android Studio 3.0 Preview. If you set up signingConfigs in your build.gradle files then run gradle assembleRelease from command line or from the gradle menu in Studio (one on the right side) it should work.

signingConfigs should be setup in each of your feature modules to ensure all feature APKs are signed.

Here's some info on setting up signingConfigs:

https://developer.android.com/studio/publish/

AdamK
  • 21,199
  • 5
  • 42
  • 58
  • This worked for us, we have added signingConfigs for all feature and base modules' gradle files. Then executed assembleRelease gradle command instead of Android Studios' default signing options. It has created instant-release.zip with all required apks. – Thana Jun 05 '17 at 11:27
  • Instant apps can now be successfully signed via the built-in Generate Signed APK in Android Studio. – Prags Oct 31 '17 at 04:17
0

You have to sign all the modules including the baseFeature module separately. Sign all of them by going in their gradle file. I was getting the same error then I signed all the modules and it worked for me.

Sandeep Chauhan
  • 117
  • 1
  • 9