0

I have created an Instant app using Android Studio 3.0. When I try to run the instant app in the emulator I get the following error

enter image description here

I use the recommended Nexus 5X image running Android 6.0 (API level 23), x86, with Google APIs. I also have the Android Instant app SDK installed.

Following are my SDK versions,

  • SDK Tools - 25.2.5
  • SDK Platform tools - 26
  • SDK Build tools - 26

And, this is my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"


defaultConfig {
    applicationId "com.example.myfirstinstantapp"
    minSdkVersion 23
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"


}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
    implementation project(':feature')
    implementation project(':base')
}
ChandrasekarG
  • 1,384
  • 13
  • 24

2 Answers2

0

Update: 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 https://github.com/googlesamples/android-instant-apps/issues/21


This appears to be a Google bug; see Sample instant app requires newer SDK

fwiw, these attempted workarounds failed:

  • Uninstalling Google Play Services for Instant Apps, as suggested on that thread
  • downgrading to Android Studio 3.0 Canary 5
  • using a real device (Galaxy S6/Android 7.0)
0

Are not you using these settings?

Nexus 5X image running Android 6.0 (API level 23), x86_64, with Google APIs

There is a note in the documentation that says:

You cannot use x86_64 architectures of the operating system for testing instant apps on an emulator.

Check again if the settings were not used x86_64 instead of x86.

Bruno A. Klein
  • 320
  • 3
  • 12