Knight-ZXW / BlockCanaryX

🔥基于堆栈采样,使用函数火焰图的形式展示Android Main Looper的慢消息处理过程,定位阻塞原因
Apache License 2.0
449 stars 48 forks source link

没有出现火焰图 #7

Closed ylmyg closed 2 years ago

ylmyg commented 2 years ago

Android11 API30 小米手机 点击demo很多次 500MS BLOCKING 点击通知进入详情页 一片空白

Knight-ZXW commented 2 years ago

进入详情页后 稍等一会,可能是在下载 web资源还没下载完成。你可以提供个 截图我看下

Knight-ZXW commented 2 years ago

可以拉下最新代码再试下,我将web页面用到的外部资源 本地化了。

ylmyg commented 2 years ago

放在本地可以出现了

ylmyg commented 2 years ago

导入依赖项目就报错了 ,请问依赖不能下载么? Execution failed for task ':app:mergeDebugNativeLibs'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not resolve io.github.knight-zxw:blockcanary:0.0.4. Required by: project :app Could not resolve io.github.knight-zxw:blockcanary:0.0.4. Could not get resource 'https://repo1.maven.org/maven2/io/github/knight-zxw/blockcanary/0.0.4/blockcanary-0.0.4.pom'. Could not GET 'https://repo1.maven.org/maven2/io/github/knight-zxw/blockcanary/0.0.4/blockcanary-0.0.4.pom'. The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.2/userguide/build_environment.html#gradle_system_properties PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Could not resolve io.github.knight-zxw:blockcanary-ui:0.0.4. Required by: project :app Could not resolve io.github.knight-zxw:blockcanary-ui:0.0.4. Could not get resource 'https://repo1.maven.org/maven2/io/github/knight-zxw/blockcanary-ui/0.0.4/blockcanary-ui-0.0.4.pom'. Could not GET 'https://repo1.maven.org/maven2/io/github/knight-zxw/blockcanary-ui/0.0.4/blockcanary-ui-0.0.4.pom'. The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.2/userguide/build_environment.html#gradle_system_properties PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

ylmyg commented 2 years ago

implementation 'io.github.knight-zxw:blockcanary:0.0.4' implementation 'io.github.knight-zxw:blockcanary-ui:0.0.4'

Knight-ZXW commented 2 years ago

implementation 'io.github.knight-zxw:blockcanary:0.0.4' implementation 'io.github.knight-zxw:blockcanary-ui:0.0.4'

昨天还没推送到MavenCenter 0.0.4版本 , 我刚刚同步,一般还需要一个小时左右。

Knight-ZXW commented 2 years ago

implementation 'io.github.knight-zxw:blockcanary:0.0.4' implementation 'io.github.knight-zxw:blockcanary-ui:0.0.4' https://repo1.maven.org/maven2/io/github/knight-zxw/blockcanary-ui/0.0.4/ 应该已经同步上去了,可以再试下

ylmyg commented 2 years ago

可以下拉了 ,还有一个问题,放入自己项目中,好像不用初始化就可以使用了,是自动初始化了么?

Knight-ZXW commented 2 years ago

可以下拉了 ,还有一个问题,放入自己项目中,好像不用初始化就可以使用了,是自动初始化了么?

是的,默认是会自动初始化 , 可以配置 资源的方式来表明 不自动初始化。 reademe 文档里有介绍


默认情况下,blockcanary 基于androidx 的startup框架,会自动进行初始化。 如果需要个性化配置,则需要通过 在res/values 下添加并配置一个指定的资源值的方式来关闭自动化初始化

添加以下资源配置 表示关闭自动初始化功能

false

关闭之后,你需要手动初始化 // 一般在 application onCreate阶段配置 val blockCanaryConfig = BlockCanaryConfig.newBuilder().build() BlockCanary.install(application,blockCanaryConfig)

ylmyg commented 2 years ago

好的 说明我已经看了 只是有些不太理解 感谢

Knight-ZXW commented 2 years ago

好的 说明我已经看了 只是有些不太理解 感谢

👌,后面有其他问题 如果没有及时回复,也可以加我微信交流 knight-ZXW