-
Notifications
You must be signed in to change notification settings - Fork 233
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
ObjectStreamClass.newInstance(Class<?>, long) is private API and will be removed in a future Android release. #58
Comments
What kind of class are you trying to save? |
The usual (String, integers, floats, boolean). Others are classes such as Date, HashMaps and Enums. Btw this is on paperdb 1.5 |
I can't reproduce this on a device running API23 |
Only happens on API24 for me. |
I've been trying to reproduce it in an example project but nothing. Been trying with different variations of Maps with Enums/Classes as their keys/values but no luck yet. |
hello pilgr,
hope this can help with fixing the warning message |
I am currently getting this warning on API 25. I ll see if I can create a sample project. |
I can confirm I'm getting this errors |
I can also confirm I am getting this error, and I'm getting a SIGSEGV signal 11 crash also. |
+1 |
+1 on Android 7.1.1 (SDK 25) |
+1 on Android 7.0
|
good news, guys! please check out the version 2.1-rc1 and let me know if it all good. I'll publish the release after that. Some details if you curious. Paper uses Kryo for serialization and deserialization objects. https://github.com/EsotericSoftware/kryo Kryo uses Objenesis lib to instantiate objects in a most efficient, platform specific way. Objenesis used some of the private ObjectStream methods to instantiate objects. Starting from Android N Google uses Open JDK which doesn't contain (obviously) those private methods. And Google added those private methods with a warning which we all seen. Objenesis fixed this in v 2.3 So I fixed this in a way by forcibly specifying the updated Objenesis version in the Paper dependencies. To speed up this I made a PR to Kryo All this means for you is you should update Paper version to 2.1 (2.1-rc1 for now) and that's it. Enjoy! :) |
Thanks pilgr for addressing all our concerns and fixing the issue! |
@pilgr |
Warning I get in logcat after every Book.write()
I guess this is actually a Kryo problem?
The text was updated successfully, but these errors were encountered: