Giter VIP home page Giter VIP logo

Comments (8)

JuanbingTeam avatar JuanbingTeam commented on May 3, 2024

I am not good at C, C++.

but i guess 'clazz' should be replaced,when replace method.

image

from andfix.

supern avatar supern commented on May 3, 2024

EventBus.java:

List<SubscriberMethod> subscriberMethods = subscriberMethodFinder.findSubscriberMethods(subscriber.getClass());

there have save the class here.

from andfix.

supern avatar supern commented on May 3, 2024

@JuanbingTeam how about Art?

from andfix.

JuanbingTeam avatar JuanbingTeam commented on May 3, 2024

@supern never tested on ART....

我的意思是.....Eventbus 存的class name是 onCreate执行时的this。 onCreate执行的是patch里的方法,这时的class name是带_CF后缀的。
关键点是 执行被替换掉的方法的过程中,获得的class上下文信息,也应该是 原有方法的。EventBus就是直接获取Class上下文的,结果它获得的是修改后的方法的Class上下文(带CF后缀的)。

from andfix.

THEONE10211024 avatar THEONE10211024 commented on May 3, 2024

@JuanbingTeam 这个问题你解决了吗?是不是只在Art上有问题?

from andfix.

JuanbingTeam avatar JuanbingTeam commented on May 3, 2024

@THEONE10211024 最近比较忙,没有跟进测试。 当时的问题是不止 ART的。

这个问题可以避免,尽量将大方法抽成小的函数就能避免此类问题了。

from andfix.

liericiyan avatar liericiyan commented on May 3, 2024

怎么解决啊?

from andfix.

zhjkenneth avatar zhjkenneth commented on May 3, 2024

我也遇到了java.lang.NoClassDefFoundError,然后报X.X.MainApplication_CF的错误,这时我的修改是,调用PatchManager patchManager = new PatchManager(this); patchManager.init("1.0.0"); patchManager.loadPatch();在Application子类的onCreate前执行,addPath方法在一个Activity错误前调用。测试结果通过了,手机是华为3X,系统Android 4.3;moto X,系统 5.1.1,不过问题中是llegalArgumentException,估计差不多吧

from andfix.

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.