Not Able To Debug App In Android Studio

前端 未结 30 2373
小蘑菇
小蘑菇 2020-12-01 02:30

I am making an app in Android Studio, now trying to debug it through adb. When I click on the word Android and the logo on the bottom bar, logcat comes up and recognizes my

相关标签:
30条回答
  • 2020-12-01 02:56

    If you enable

    <application android:debuggable="true">
    </application>
    

    In the application manifest.xml make sure you disable it when generating the final signed apk since this can serve as a security loop hole for attackers. Only use it if only one of your applications does not show the logs. However before considering that option try this:

    Navigate to tools in the android studio

     Tools==>android==>disable adb integration and again enable it
    
    0 讨论(0)
  • 2020-12-01 02:56

    In my case I had the same problem because I try to debug signed apk. In my gradle config I made differents build variants, and try to debug release build with production keystore.jks

    0 讨论(0)
  • 2020-12-01 02:57

    I did clean build using below command.. Surprisingly worked.

    sh gradlew clean build

    Hopefully someone get help!

    0 讨论(0)
  • 2020-12-01 02:58

    Make sure you have enabled the ADB integration.

    In Menu: Tools -> Android -> Enable ADB integration (v1.0)

    0 讨论(0)
  • 2020-12-01 02:58

    In my case, Had to remove the proguard in debug Build Type by completely clearing the text file proguard-rules.pro and making minifyEnabled false in build.gradle file

      debug {
                debuggable true
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
    
    0 讨论(0)
  • Here's a little oops that may catch some: It's pretty easy to accidentally have a filter typed in for the logcat output window (the text box with the magnifying glass) and forget about it. That which will potentially filter out all output and make it look like nothing is there.

    0 讨论(0)
提交回复
热议问题