Open Aunali321 opened 2 years ago
Should be fixed now. I don't have an app to test with, so please give the updated code a try and close the issue if the problem has been resolved.
@StevenArzt whats the maven for develop branch?
I haven't tested it, but it is likely still broken. Just a few lines lower you access it again without a null check https://github.com/Sable/axml/blob/97656d702e3bd72f6a36fdaa5fc26740ee9b6c66/src/pxb/android/StringItems.java#L101
I don't see the problem. My assumption was that item.data
is null
, not item
itself. That's also what my first check is about. If the variable stringData
holds null
, that should be fine.
Here is it again being referenced and causing an NPE
OK, I got it. Fix has been committed.
https://github.com/Sable/axml/blob/e7771fd82790ce6449816365e174b76f46327899/src/pxb/android/StringItems.java#L90
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference at pxb.android.StringItems.prepare(StringItems.java:90) at pxb.android.axml.AxmlWriter.prepare(AxmlWriter.java:344) at pxb.android.axml.AxmlWriter.toByteArray(AxmlWriter.java:356)