Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot run app in debug mode from Android Studio

I cannot run my app in debug mode in Android Studio. Sometimes it says the problem is with localhost:8601, and other times I get the output below:

Client not ready yet.
Client not ready yet.
Client not ready yet.
Client not ready yet.
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.test.myapp/.activity.SplashActivity }
like image 214
Mahdi Avatar asked Oct 20 '15 14:10

Mahdi


People also ask

How do I run Android in debug mode?

For Android 4.2 and newer, Developer options is hidden by default; use the following steps: On the device, go to Settings > About <device>. Tap the Build number seven times to make Settings > Developer options available. Then enable the USB Debugging option.

How do I enable debug on apk?

To start debugging an APK, click Profile or debug APK from the Android Studio Welcome screen. Or, if you already have a project open, click File > Profile or Debug APK from the menu bar. In the next dialog window, select the APK you want to import into Android Studio and click OK.


2 Answers

I finally solved the problem. my phone setting should set on MTP mode and nothing else. debugger connects to my phone after this change.

like image 56
Mahdi Avatar answered Oct 11 '22 21:10

Mahdi


I had same issue and fixed now. Here is what i did which might help u

  1. Confirm the exact problem, Is it that debugger is not able to connect or breakpoints not hit. TO confirm this put breakpoint in MainActivity. Also application would be waiting for debugger, just check if it stopped waiting or any console logs. Also just check if debugger shows pause button

  2. Check ur gradle config and make sure apk has symbols. (Debug release)

In my case issue was 1st and got it resolved. Hope this might help else pls ignore

like image 25
Nasir Avatar answered Oct 11 '22 21:10

Nasir