bytedance / btrace

🔥🔥 btrace(AKA RheaTrace) is a high performance Android trace tool which is based on Perfetto, it support to define custom events automatically during building apk and using bhook to provider more native events like Render/Binder/IO etc.
Other
1.93k stars 273 forks source link

2.0.3-rc02 版本无法通过构建 #120

Open XuanJiAndroid opened 9 months ago

XuanJiAndroid commented 9 months ago

运行背景: jdk 1.8.0 gradle 6.1.1 AGP 4.0

> Task :app:dexBuilderDebug 阶段会大量有报错,类型信息如下:

AGPBI: {"kind":"error","text":"NullPointerException during IR Conversion","sources":[{"file":"/Users/ram/workspace/workDir/xx-android/app/build/intermediates/transforms/rheaTrace/debug/81.jar"}],"tool":"D8"}

app目录下的gradle配置如下:

rheaTrace {

    compilation {
        //为减少 APK 体积, 你可以为 App 中需要跟踪的方法设置 id 以此来跟踪此自定义事件, 默认值 false。
//        traceWithMethodID = false
        //该文件配置决定哪些方法您不希望跟踪, 默认值 null。
        traceFilterFilePath = "${project.rootDir}/rhea-trace/traceFilter.txt"
        //用特指定方法 id 来设置自定义事件名称, 默认值 null。
//        applyMethodMappingFilePath = "${project.rootDir}/rhea-trace/keep-method-id.txt"
        needPackageWithMethodMap = true
    }

    runtime {
        //仅在主线程抓取跟踪事件, 默认值 false。
        mainThreadOnly true
        //在 App 启动之初开始抓取跟踪事件, 默认值 true。
        startWhenAppLaunch true
        //指定内存存储 atrace 数据 ring buffer 的大小。
        atraceBufferSize "500000"
    }
}

traceFilter.txt 文件内容如下:

-blockpackage com/google
-blockpackage android/support
-blockpackage androidx/
WangFeng-AHU commented 7 months ago

麻烦提供一下详细的构建失败日志吧,如果方便的话也提供下错误中涉及的 build/intermediates/transforms/rheaTrace/debug/81.jar jar 包。

withoutbuff commented 1 month ago

麻烦提供一下详细的构建失败日志吧,如果方便的话也提供下错误中涉及的 build/intermediates/transforms/rheaTrace/debug/81.jar jar 包。

-blockpackage com/airbnb/lottie/LottieTask -blockpackage androidx/exifinterface/media/ExifInterface -blockpackage com/tencent/tinker/android/dex/Dex -blockpackage com/android/multidex/MainDexListBuilder 为什么我配置多个屏蔽项目,只有最后一个有用?

有8个类似下发的报错 org.gradle.tooling.BuildException: Failed to process: C:\Users\fionn.zhang\AndroidStudioProjects\n1904\app\build\intermediates\transforms\rheaTrace\overseaFour\debug\29.jar