android-debug
How to debug in Android Studio using adb over WiFi
You can find the adb tool in /platform-tools/ cd Library/Android/sdk/platform-tools/ You can check your devices using: ./adb devices My result: List of devices attached XXXXXXXXX device Set a TCP port: ./adb shell setprop service.adb.tcp.port 4444 ./adb tcpip 4444 Result message: restarting in TCP mode port: 4444 To init a wifi connection you have to check … Read more
React Native Android build failure with different errors without any changes in code for past days due to publish of React Native version 0.71.0-rc.0
The build failures for Android was due to the publish of the React Native version 0.71.0-rc0. Note: Error may be different but this would be the solution if you are getting android build failures without any changes in code for past two days before trying these methods please revert back every changes you have done … Read more
How to debug the Android App in release mode using Android studio
In your gradle file, you must add debuggable ability in your release flavor. buildTypes { release { debuggable true minifyEnabled false signingConfig signingConfigs.release proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.txt’ } debug { debuggable true minifyEnabled false applicationIdSuffix ‘.debug’ } } signingConfig is release configuration it must be added in gradle file in android{} block, something like this: signingConfigs … Read more
Disable ANR messages while debugging
In the Developer Options scroll down to the Debugging section and choose your app in “Select debugging app“. This way it will not trigger any ANR when paused in a breakpoint. The setting value will be remembered even if you remove/reinstall your app. Note that this option may not be available depending on your API … Read more
How to use Monitor (DDMS) tool to debug application
Go to Tools > Android > Android Device Monitor in v0.8.6. That will pull up the DDMS eclipse perspective.
‘Source code does not match the bytecode’ when debugging on a device
There’s an open issue for this in Google’s IssueTracker. The potential solutions given in the issue (as of the date of this post) are: Click Build -> Clean Disable Instant Run, in Settings -> Build, Execution, Deployment
Debugging with Android Studio stuck at “Waiting For Debugger” forever
Obviously is yet another Android Studio, or rather ADB bug. Just use this command to disable it. adb shell am clear-debug-app OR Ensure there is nothing to wait for, by automatic uninstall from Device before each test-run, using Gradle’s uninstallAll task, as mentioned in: stackoverflow.com/Auto uninstall before install?
Android app crashes when launched in debug mode
For me, it occurred when I have a breakpoint in a nested function. In my case, it was within Runnable.run() {}. Not sure if it happens in other nested functions. Example: public class TouchEvent { public boolean HandleEvent(MotionEvent Event) { new Runnable() { @Override public void run() { int i=5; i++; }}; } } If … Read more