问题描述
我正在开发具有多个模块的Android应用.该应用程序使用ProGuard,所有模块中的compileSdkVersion都设置为27,并且当我尝试启用Advanced Profiling时,我继续收到一条消息,提示所选过程无法使用Advanced Profiling".
I am developing an Android app with multiple modules. The app uses ProGuard, compileSdkVersion is set to 27 in all modules, and when I tried to enable Advanced Profiling I continue to get a message saying "Advanced profiling is unavailable for the selected process".
在搜索有关该主题的其他问题之后,我尝试过的解决方案:
Solutions I've tried after searching other questions about the topic:
- (显然)为应用程序以及默认的运行配置"启用高级分析"
- 使用minifyEnabled false在所有模块中禁用ProGuard
- 将Studio版本更新为3.1.3,并将Gradle更新为4.4
- 上述更改后重建项目
我错过了什么吗?我还可以做些什么来启用高级分析"?
Am I missing something? Is there anything else I can do to enable Advanced Profiling?
推荐答案
在我的情况下,我遇到了同样的问题,并且解决方案很简单:在文件build.gradle
中为所选的构建变体设置debuggable true
.
I had the same problem and the solution was easy, in my case: set debuggable true
in file build.gradle
for the selected Build Variant.
这篇关于所选进程无法使用Android性能分析,但启用了高级性能分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!