GithubHelp home page GithubHelp logo

Comments (3)

mzule avatar mzule commented on August 19, 2024

7.0 的 AGP 吗,这个正在适配了,近期会发布。

from btrace.

ShurZhou avatar ShurZhou commented on August 19, 2024

7.0 的 AGP 吗,这个正在适配了,近期会发布。

不仅7.0的AGP开启minifyEnable会导致插桩失败

在4.1.0的AGP上开启R8也会导致插桩失败。你们这个仓库的demo就可以复现,将gradle.properties中android.enableR8改成true,然后编译,插桩并没有生效

from btrace.

qiuqifan avatar qiuqifan commented on August 19, 2024

+1 ,碰到了跟楼主一样的问题。
AGP版本为4.1.0

没有完全打开r8,仅开启minifyEnable配置的情况下:
android.enableR8.fullMode=false
minifyEnabled true
shrinkResources true

搜了下,对应处理源码应该在 rhea-build/rhea-gradle-plugin/src/main/java/com/bytedance/rheatrace/plugin/internal/CopyMappingTask.kt 里面,仅判断了是否指定了enableR8属性,上述配置情况下,会走hookAssetsTask方法尝试hook dexbuilder,但开启minifyEnabled之后并不会dexbuilder task,导致hook 失败无法生成methodMapping文件。
val enableR8 = "false" != project.properties["android.enableR8"]
if (enableR8) {
hookAssetsTaskR8(variant, project, assetsDir)
} else {
hookAssetsTask(variant, project, assetsDir)
}

@mzule @ShurZhou

from btrace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.