您的位置:首页 > 移动开发 > Android开发

Android Studio Project debug library show source code does not match the bytecode

2016-12-21 19:45 1276 查看
最近接手了一些新的工程,里面用android studio调试library。在调试的时候 会发现调用某些接口的时候 ide 提示:

source code does not match the bytecode

但是看library源码的确是匹配的,google了好久也没有结论,WTF!!!!!!

不但如此Debugger下的Frames堆栈对应的接口也是不对的,我就开始怀疑是不是代码混淆的问题。但是去看gradle文件debug模式下的确没有对library进行混淆。

后来在网上查

BuildConfig.DEBUG always false when building library projects with gradle的问题时候根据android开发工程在问题中这样解释的:

No. this means the library used by the project is always the release version of the library. This may or may not be a problem to you.

ok这样就解释了 困扰我的问题!!!在调试的时候去掉gradle中对release的混淆就好了。

https://code.google.com/p/android/issues/detail?id=52962
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐