Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Java classes #418

Open
AsyncProxy opened this issue Nov 15, 2024 · 4 comments
Open

Extend Java classes #418

AsyncProxy opened this issue Nov 15, 2024 · 4 comments

Comments

@AsyncProxy
Copy link

JavetBuddy does not work in android, causing the extended Java class to throw Failed to extend {0} by a dynamic object.

@caoccao
Copy link
Owner

caoccao commented Nov 15, 2024

The Android support is not implemented. Its priority is low on my list.

@AsyncProxy
Copy link
Author

The Android support is not implemented. Its priority is low on my list.

Can you use net.bytebuddy:byte-buddy-android:1.15.5 to write an extension, I just debugged it, it can be injected into the Android VM, can you help implement it.

@AsyncProxy
Copy link
Author

The Android support is not implemented. Its priority is low on my list.

Thank you very much JavetBuddy, I have refactored a plugin with your ideas, and I have implemented a basic extension for android, thank you very much!

@AsyncProxy
Copy link
Author

The Android support is not implemented. Its priority is low on my list.

And I'll give you a bug here, when you generate bytecode, its matching should not be isPublic, you should match the method of the JS object prototype and then use ElementMatchers.namedOneOf to intercept it, otherwise you will encounter an error that rewrites part of the method and causes a more than expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants