问题
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.
回答1:
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.
回答2:
With v1.3.1 I disabled & enabled again "Enable ADB Integration" and it worked.
回答3:
Go to Android Studio, Tools, Android, Disable ADB Integration and Enable it again. Make sure you clean your project before running !
回答4:
Just click on 'debug icon'(BUG icon) next to 'run icon'(Arrow icon) then u can see app in logcat
回答5:
This helped me:
1)Disconnect device
2)Kill adb from taskmanager
3)Clean project
4)Connect device
回答6:
Make sure you have your DDMS window closed. If it is open, your logs might be visible there but not in Android Studio.
回答7:
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
回答8:
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
.
回答9:
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.
回答10:
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
...
}
}
回答11:
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.
回答12:
you should make share your IDE(Intellij or AS) Build Variants settings
there is a simple
来源:https://stackoverflow.com/questions/30855962/why-do-i-see-no-debuggable-applications-in-android-studio-logcat-while-my-appl