Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server and the Parse Android SDK.
Issue Description
The app crashes when initializing Parse with the latest Gradle/Android Studio version when using Proguard/R8 with minifyEnabled true
and 'com.android.tools.build:gradle:8.0.0'
.
Steps to reproduce
Initialize Parse at app startup with Parse.initialize(new Parse.Configuration.Builder(...));
Actual Outcome
The app crashes.
Expected Outcome
The app does not crash.
Environment
Parse Android SDK
- SDK version:
4.2.0
- Operating system version:
Android 12
Logs
Caused by java.lang.IllegalArgumentException: Cannot register a type that does not implement the default constructor!
at com.parse.ParseObjectSubclassingController.registerSubclass(ParseObjectSubclassingController.java:95)
at com.parse.ParseObject.registerSubclass(ParseObject.java:291)
at com.parse.ParseObject.registerParseSubclasses(ParseObject.java:1032)
at com.parse.Parse.initialize(Parse.java:169)
at com.parse.Parse.initialize(Parse.java:140)
I do not have any custom subclasses registered.
Fixed by
Keeping all classes that are registered in registerParseSubclasses()
by adding the line -keep @com.parse.ParseClassName class com.parse.*
to proguard-rules.pro
.