Suddenly, Android Studio debugger don't stop in breakpoints. How solve it? - android-studio

It is scary how this kind of problem swarms here at Stackoverflow and there doesn't seem to be any consistent solution.
I've read all stuff from Stackoverflow and nothing seems to solve this problem.
I have Android Studio 4.02 and Windows 7, and I use Kotlin
Suddenly, the Android Studio don't stop in breakpoints anymore.
I've tried everything that it's written and nothing works.
a) I did a boot in my computer
b) Reinitialize my cell phone
c) Check all setups in Developer options: USB Debugger is On, Waiting for the debugger and the app name in Select an app to be debugger
d) Use the option in Android Studio: Invalidate Caches and Restart
e) Turn off the minifyEnabled option in the Gradle (Module) and
comment out the option shrinkResources
f) Comment out the option proguardFiles
Whan can I do?

There is something that I've tried that has solved my problem, until the next time and then I wil do the same trick, without hesitation.
I've simply uninstalled the program completely on the cell phone.
As usual with Android Studio, it doesn't have logic, but I don't care, as long as it solves the problem

Related

Why Are Android Studio Menus Not Working?

I have been using Android Studio for years. Very shortly after upgrading to Android Studio 3.5, the menu options have stopped working. I mean, anything under File, Edit .. all the way to Help. By "stopped working", I mean, I can use the mouse to select, and then .. nothing happens. A colleague suggested to invalidate caches. But invalidate caches itself is under the File menu, so nothing happens when it is selected.
Any ideas? Quitting and starting android studio didn't work. Rebooting didn't work. Changing the java version used to run Android Studio didn't work (it is set to be the same one that gradle is using). Even downloading and installing a fresh copy of Android Studio 3.5 didn't work -> from this, I suspect the problem is a settings problem, but WHICH settings got somehow corrupted? and that survives even with a fresh installation of Android Studio?
To find-in-path, the menu option doesn't work, whereas I can directly use the keyboard shortcut ⇧⌘F and it brings up the find window.
Am running on MacOS Mojave. Java home is /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home
Finally, Android Studio 4.0 came along, and we installed the patch to upgrade to it, and the mysterious problem went away, presumably as a result of the upgrade.

Android Studio 3.0 VERY VERY VERY slow on run

I have a very big problem using Android Studio.
Every time I make a code changing, I have to check if all has gone well launching my app; but as soon as I click the "Run app" or the "Apply changes", it's the end: it starts the Gradle build process, which take even 30 minutes to complete, and furthermore Android Studio take the full control of my computer, not allowing to do nothing anymore (like open the browser, open notepad++, and so on...).
Can anyone help me?
Thanks
If you use Eclipse you won't have this problem anymore. but if you want to stick with android studio and gradle you can run your emulator and gradle once and whenever you want to compile your code run it on the already built gradle. this means that do not close the emulator and run your program on it again and again. this way you will not have to spent alot of time on loading the emulator and gradle
Android Studio is not a very light software.It uses a lot of your system RAM and CPU power.So if you are using an old system then it is obvious that android studio will run slow.If possible then upgrade your system.
And one more thing it's better to use actual device rather than Virtual Emulator for our application working test.

Android Studio Debug

i am testing my code but i have a problem, when i try to run the "Debug" process my cell phone get stock on Waiting For Debugger screen and i have to use Attach Debugger to Android Process on Android Studio, it used to attach automatically but i have been changing my android studio configuration, if there any way to make it automatic again i tried i lot but i can't find it?
Try toggling Tools-> Android -> Enable ADB Integration off and on, I had this issue when switching to the beta 2 of Android Studio 3. This helped me solving the issue.

Android studio doesn't launch in Elementary OS (Freya)

Alright, so yesterday I was writing code in Android studio, and when I saw that the autocomplete function wasn't working properly, I did the "Invalidate and Restart" function, that closed the Android Studio. And now, when I try to start Android Studio, simply nothing happens, I can spam the shortcut like crazy, nothing pops up, nothing. I was working on a project so I really need this fixed ASAP, but Google offers no clues.
I'd really appreciate any clues or fixes.
Ended up reinstalling the OS after running into some more issues with removing and reinstalling the Studio a couple of times.

Why do I see "No Debuggable Applications" in Android Studio Logcat while my application is running?

I wanted to filter what is shown in the Android Studio Logcat to show what is relevant to my application only. I have chosen Show only selected applications from the drop down at the top of the logcat as shown in the following screenshot:
But in the drop down menu above it which is supposed to show running application(s) (and other options) from which we can choose our application to see Log messages related to it only, I see No debuggable Applications as the only option.
Why? What should I do to fix this?
Note: It does not happen every time I run the project. Sometimes it happens, sometimes it automatically selects my app (when I run it) from the drop down menu shown in the second screenshot, and filters the results properly.
Open Android Studio, Go to,
Tools-> Android -> Enable ADB Integration.
Open Android Monitor,
After enabling that, everything should work properly and you can see your package name of your application.
With v1.3.1 I disabled & enabled again "Enable ADB Integration" and it worked.
Go to Android Studio, Tools, Android, Disable ADB Integration and Enable it again. Make sure you clean your project before running !
Just click on 'debug icon'(BUG icon) next to 'run icon'(Arrow icon) then u can see app in logcat
This helped me:
1)Disconnect device
2)Kill adb from taskmanager
3)Clean project
4)Connect device
Make sure you have your DDMS window closed.
If it is open, your logs might be visible there but not in Android Studio.
In my case I used to use 2 Android Studio's (stable and canary) so the reason of the problem was this.
So, if you are running another IDE such as another Android Studio or Eclipse this could be the problem.
Solution: Close one of the IDE and if "Enable ADB Integration" is already enabled disabling and re-enabling solves it
For me it was a case of changing the build.gradle file to:
buildTypes {
release {
debuggable true
...
...
}
Project sync then the app should appear in the menu which previously only had No debuggable applications.
I had the same issue. As in this picture, instead of "app", it was class name. So click it and select "app" and the problem was solved.
Please make sure to have the android property debuggable = "true" in the application tag AndroidManifest.xml
**<application android:debuggable="true">
</application>**
Also, if you have multiple build variants (ex. debug, alpha, release) you may need to check which build you are attempting to debug and set the debuggable true attribute accordingly in the build.gradle
buildTypes {
debug {
...
debuggable true
...
}
alpha {
...
debuggable true
...
}
release {
...
debuggable false
...
}
}
I found that emulators worked fine with solutions listed above, but my real device never did. Eventually some log came up saying I needed to add the debug flag to my manifest. Since I am using project flavors, it was easy enough to add this to my debug build variant in my gradle file. However, you could also manually add the flag to the manifest as needed - just make sure to not have it there in a production app version.
you should make share your IDE(Intellij or AS) Build Variants settings
there is a simple

Resources