-
-
Notifications
You must be signed in to change notification settings - Fork 736
IllegalArgumentException when initializing Parse #1194
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
Comments
Thanks for opening this issue!
|
In other words, gradle 8 is not supported OOTB by the Parse SDK, is that correct? |
Yes (if you are using minifyEnabled). |
Pre gradle 8 minify would work, right? |
Yes, everything worked until I updated to Gradle 8 |
Thanks for clarifying, do you have an idea how to fix it? Would you want to open a PR? |
I fixed it by adding I´m not sure which file in this project to add it to, maybe https://github.com/parse-community/Parse-SDK-Android/blob/master/parse/release-proguard.pro |
@azlekov, any idea how we could fix this? |
No clue, @mtrezza. I will check upcoming days. Maybe is related with latest version of AGP and R8. |
Experiencing this as well. Proposed fix did not resolve it for us. |
Same issue after upgrading Gradle to version 8. Like @hej2010 I do not have any custom subclasses registered and |
Currently experiencing this. Proposed fix did not resolve it for us. @tSquaredd Did you find a fix? |
@SOGAPPS we ended up adding this to our proguard rules
|
Thanks @tSquaredd Using this worked for us - both "keep" & "keepclassmembers". We added the two lines of code below to our apps "proguard-rules.pro" file.
|
Gradle 8.0 switches to using R8 in "full mode" by default: https://r8.googlesource.com/r8/+/refs/heads/master/compatibility-faq.md#r8-full-mode It can be disabled by adding |
Does this comment already provide the solution? @SOGAPPS In your comment did you mean one has to replace |
No, for clarity, we added the two lines of code below to our apps "proguard-rules.pro" file. Doing this resolved our issue.
|
@azlekov do you think a PR with these lines could fix this issue? |
I will compare and adjust mine in few days. |
🎉 This change has been released in version 4.2.1 |
New Issue Checklist
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
4.2.0
Android 12
Logs
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.*
toproguard-rules.pro
.The text was updated successfully, but these errors were encountered: