简体   繁体   中英

Application is waiting for debugger

I know this has been mentioned many times, but I've noticed strange thing that were not talked before. In fact, when the app get deployed on device, even we disconnect device from pc and restart the phone the app will still show this message "Waiting For Debugger".

When we plug in to the pc, and attach debugger in IDE, application start running normally. The same is when we disconnect debugger --> app, popup the black screen and "Waiting For Debugger". We can iterate this to infinity.

It looks as if there were some dependency to debugger.

Activity that is set as launcher in manifest:

<activity
        android:name=".activities.SplashScreenActivity"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

Project buildscript:

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.14.4'

    }
}

app module buildscript:

apply plugin: 'android'
android {
    compileSdkVersion 21
    buildToolsVersion "21.1.1"

    defaultConfig {
        applicationId "com.dot42"
        minSdkVersion 14
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile project(':deviceList')
    }
}

library module buildscript:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 'Google Inc.:Google APIs:21'
    buildToolsVersion "21.1.1"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 21

    }

}

dependencies {
    compile 'com.android.support:support-v4:21.0.2'
}

Any ideas?

Go to Settings > Developer Options In Debugging section make sure "Select debug app" is not set for your application, along with "Wait for debugger" options checked. If so this is expected behaviours since Debugged application waits for debugger to attach before executing.

Visit this Linked image it will guaranteed work for you.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM