问题
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.
- Set debuggable to false in release mode
- Restart ADB
- Restart Android Studio
- Restart phone
- Restart Computer
- Switch USB port
- Update everything
- moving the keystore inside the base path of my android project.
- set minifyEnabled false
- 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