Git Product home page Git Product logo

Comments (20)

tSquaredd avatar tSquaredd commented on June 10, 2024 2

@SOGAPPS we ended up adding this to our proguard rules

-keepclassmembers public class * extends com.parse.** {
   public <init>(...);
}

from parse-sdk-android.

hej2010 avatar hej2010 commented on June 10, 2024 1

I fixed it by adding
-keep @com.parse.ParseClassName class com.parse.*
to proguard-rules.pro, then it no longer crashes.

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

from parse-sdk-android.

azlekov avatar azlekov commented on June 10, 2024 1

No clue, @mtrezza. I will check upcoming days. Maybe is related with latest version of AGP and R8.

from parse-sdk-android.

SOGAPPS avatar SOGAPPS commented on June 10, 2024 1

@mtrezza

No, for clarity, we added the two lines of code below to our apps "proguard-rules.pro" file.

Doing this resolved our issue.

-keep @com.parse.ParseClassName class com.parse.*
-keepclassmembers public class * extends com.parse.** { public <init>(...); }

from parse-sdk-android.

mtrezza avatar mtrezza commented on June 10, 2024 1

@azlekov do you think a PR with these lines could fix this issue?

from parse-sdk-android.

azlekov avatar azlekov commented on June 10, 2024 1

I will compare and adjust mine in few days.

from parse-sdk-android.

parseplatformorg avatar parseplatformorg commented on June 10, 2024 1

🎉 This change has been released in version 4.2.1

from parse-sdk-android.

parse-github-assistant avatar parse-github-assistant commented on June 10, 2024

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

from parse-sdk-android.

mtrezza avatar mtrezza commented on June 10, 2024

In other words, gradle 8 is not supported OOTB by the Parse SDK, is that correct?

from parse-sdk-android.

hej2010 avatar hej2010 commented on June 10, 2024

In other words, gradle 8 is not supported OOTB by the Parse SDK, is that correct?

Yes (if you are using minifyEnabled).

from parse-sdk-android.

mtrezza avatar mtrezza commented on June 10, 2024

Pre gradle 8 minify would work, right?

from parse-sdk-android.

hej2010 avatar hej2010 commented on June 10, 2024

Yes, everything worked until I updated to Gradle 8

from parse-sdk-android.

mtrezza avatar mtrezza commented on June 10, 2024

Thanks for clarifying, do you have an idea how to fix it? Would you want to open a PR?

from parse-sdk-android.

mtrezza avatar mtrezza commented on June 10, 2024

@azlekov, any idea how we could fix this?

from parse-sdk-android.

tSquaredd avatar tSquaredd commented on June 10, 2024

Experiencing this as well. Proposed fix did not resolve it for us.
Any ideas?

from parse-sdk-android.

riccardoch avatar riccardoch commented on June 10, 2024

Same issue after upgrading Gradle to version 8.
The proposed fix worked for me.

Like @hej2010 I do not have any custom subclasses registered and minifyEnabled true for release build.

from parse-sdk-android.

SOGAPPS avatar SOGAPPS commented on June 10, 2024

Currently experiencing this. Proposed fix did not resolve it for us.
We've custom subclasses registered.

@tSquaredd Did you find a fix?

from parse-sdk-android.

SOGAPPS avatar SOGAPPS commented on June 10, 2024

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.

-keep @com.parse.ParseClassName class com.parse.*
-keepclassmembers public class * extends com.parse.** { public <init>(...); }

from parse-sdk-android.

hej2010 avatar hej2010 commented on June 10, 2024

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
"R8 performs more aggressive optimizations, meaning additional ProGuard configuration rules may be required."

It can be disabled by adding android.enableR8.fullMode=false to gradle.properties

from parse-sdk-android.

mtrezza avatar mtrezza commented on June 10, 2024

Does this comment already provide the solution?

@SOGAPPS In your comment did you mean one has to replace ParseClassName with the custom classes a developer is using in their app?

from parse-sdk-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.