最近项目从eclipse平台转移到Android Studio上面,出现了一个很奇葩的问题!
问题就是:无法调试,Android Monitor可以查看到devices,但是却显示 no debuggable applications
为什么说这个问题奇葩那,因为在eclipse上面完全正常,在AS上面就是不行,于是乎各种baidu,google
解决方法最普遍的无外乎:
You also should have Tools->Android->Enable ADB Integration active.
具体详见:
http://stackoverflow.com/questions/26593927/android-studio-no-debuggable-applications
http://stackoverflow.com/questions/16753939/not-able-to-debug-app-in-android-studio
期间尝试着在主应用中
设置
<application android:debuggable="true">
</application>
提示:
Avoid hardcoding the debug mode;leaving it out allows debug and release builds to automatically assign one less
之前有提示就不继续了,这次硬着头皮继续下去了,运行的时候报错,终于找到问题了
原来在主工程的一个依赖包中设置了debuggable = “false” ,这。。。 真是无语了。然后重启 按照Tools->Android->Enable ADB Integration active.的步骤就好了。