Search code examples
javaandroidandroid-studiomobileadb

Android Studio: android.intent.category.LAUNCHER Client not ready yet


Every time I try to run my app on my phone I get this message

and it crashes. I don't know how to fix it, I already unchecked Instant Run and installed ADB Idea but still no luck. Any help?

EDIT (build.gradle):

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.fretshot.ihc.sapp"
        minSdkVersion 22
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        resValue "string", "google_maps_key", (project.findProperty("GOOGLE_MAPS_API_KEY") ?: "")
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.google.android.gms:play-services-maps:15.0.0'
    implementation 'com.google.android.gms:play-services-location:15.0.0'
    implementation 'com.ncorti:slidetoact:0.3.0'
}

Solution

  • Did you export your launcher activity in AndroidManifest.xml? Seeing you're launching it via adb you need to add:

    <activity
        android:name=".yourpackagename.YourActivity"
        android:exported="true"/>
    

    in order for your activity to be adb-launchable. Activities with intent-filter are exported by default.