Sample instant app requires newer SDK

2019-06-27 12:36发布

问题:

I'm keep getting the error at the bottom of the question even though I followed official emulator setup guide and sample project setup guide to the letter.

Using:
- Android Studio 3.0-Alpha7
- Pixel emulator with SDK 23

Provisioning succeeds and was able to enable instant apps in Settings > Google > Instant Apps

Side loading instant app failed: Failure when trying to read bundle. Instant App com.instantappsample requires an SDK version which is newer than the one installed on device. Please update the SDK on the device. Error while Uploading and registering Instant App

回答1:

Creating an API 26 (aka O) emulator allowed me to successfully install the Instant App, while otherwise following the guide. Hat-tip to donly from Github project android-instant-apps Workarounds I tried unsuccessfully first:

  • Uninstalling "Google Play Services for Instant Apps" (from the other answer)
  • Downgrading to Android Studio 3.0 Canary 5
  • Using a physical device that can run instant apps (Galaxy S6 SM-G920V, Android 7.0)


回答2:

This might be an issue on our end. Thanks for reporting. Please try the following workaround:

  • Settings -> Apps
  • Find Google Play Services for Instant Apps.
  • Uninstall this app.

You might get a notification when it's uninstalled, but please ignore it.

Now proceed to run your instant app again. This issue should go away.



回答3:

It works for me to switch to API O X86 emulator.