Comments (1)
问题解决了
- visitInsn尾部插入代码出错:at stack depth 0, expected type java.lang.Object but found int
注入的方法描述:(Ljava/lang/Object;Z)V
for (def i = methodCell.paramsStart; i < methodCell.paramsStart + methodCell.paramsCount; i++) {
// Todo: 这里直接传入i居然报错:at stack depth 0, expected type java.lang.Object but found int;强制转换成Object才行。why?
methodVisitor.visitVarInsn(Opcodes.ALOAD, i);
}
// 改写成如下代码依然报错
methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);
if (methodCell.paramsCount == 2) {
methodVisitor.visitVarInsn(Opcodes.ILOAD, 1);
}
methodVisitor.visitMethodInsn(Opcodes.INVOKESTATIC, ReWriterConfig.sAgentClassName, methodCell.agentName, methodCell.agentDesc, false);
出错原因:
代码执行时,输入的方法描述实际为(Ljava/lang/Object;)V
,只接收一个参数,而methodCell.paramsCount
仍为2,导致methodVisitor.visitVarInsn
指令加载了两次。
from laziertracker.
Related Issues (20)
- multiple activity declared in src/main/java cause crash HOT 3
- 关于path HOT 1
- rebuild project got error HOT 1
- saveModifiedJarForCheck HOT 1
- 布局文件.xml 里的直接写的android:onClick() 如何做到埋点 HOT 1
- className处理出错 HOT 1
- 弹出的dialog popwindow 怎么埋点 HOT 4
- Return code 1 for dex process HOT 5
- 不能debug的情况有没有遇到啊? HOT 5
- butterknife 注入失败 HOT 1
- AS 3.3.2编译不过
- Execution failed for task ':app:transformClassesWithDexBuilderForDebug'. DEX打包错误
- ButterKnife 注册的onclick 怎么插装? 目前看好像有写但是插入不进去
- view变化的问题
- view变化的问题
- dex数量增加大20几个,每个dex的class数量很少
- Jar修改的时候匹配有问题
- 請問 应用于Android无埋点的Gradle插件解析
- codelessConfig 配置必须要把本地的仓库发布到远端吗 HOT 1
- hook依赖库的jar包没效 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laziertracker.