My App waiting for debugger in release mode in android studio 3.1.3

只谈情不闲聊 提交于 2019-12-11 07:29:51

问题


I am an amateur in Kotlin and android studio. I am trying to integrate the facebook login to my app but end up at a roadblock. After following the facebook login for android integration tutorial, I am unable to run the app in release mode. I did previously run the same app in debug mode for debugging. But now the app on my phone says "Waiting for Debugger" in release mode too.

I have done the following already and it has not worked.

  1. Set debuggable to false in release mode
  2. Restart ADB
  3. Restart Android Studio
  4. Restart phone
  5. Restart Computer
  6. Switch USB port
  7. Update everything
  8. moving the keystore inside the base path of my android project.
  9. set minifyEnabled false
  10. Tried Checking BuildConfig.BUILD_TYPE.equals("debug")

In the Run it shows,

07/24 12:11:43: Launching app
$ adb shell am start -n "com.example.vishwa.imaginators/com.example.vishwa.imaginators.SplashscreenActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 16495 on device xiaomi-redmi_note_3-57c506ac
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/ActivityThread: Application com.example.vishwa.imaginators is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk

I did not put up the logcat because it's got tons of text in it.


回答1:


You might have added your app in Select app to be debugged on your phone. In Settings -> Developer Options -> Select app to be debugged

To resolve this, go to Select app to be debugged and click on No apps




回答2:


Restart android studio and than check, if not fix than On some machines/projects the debugger do not attach automatically so you need to attach it manually.

(studio menu -> Run -> Attach debugger to Android process)

make sure you set debuggable true in release mode:

 buildTypes {
        release {
            minifyEnabled false
            shrinkResources false  
            zipAlignEnabled true
            debuggable true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
}



回答3:


I had this problem with the phone keeps waiting for debugger, I restarted the phone and that fixed the issue



来源:https://stackoverflow.com/questions/51492371/my-app-waiting-for-debugger-in-release-mode-in-android-studio-3-1-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!