-
Notifications
You must be signed in to change notification settings - Fork 26
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
Android ProGuard/R8 error #5447
Comments
Hello! There is a solution for this issue, but it requires a manual change in the Android folder. If you're deploying via GitHub or outside of FlutterFlow, you can resolve it by editing the
In the meantime, I’ve reached out to an engineering team member to get further guidance on how to proceed with this issue. I'll update you as soon as I have more information. Thank you for your patience and understanding! |
Thank you! I am deploying from flutterflow so will wait on a solution from
the engineering team
…On Wed, Feb 19, 2025, 10:25 AM Ale Zanello ***@***.***> wrote:
Hello!
There is a solution for this issue, but it requires a manual change in the
Android folder. If you're deploying via GitHub or outside of FlutterFlow,
you can resolve it by editing the android/app/proguard-rules.pro file and
adding the following lines:
-keepattributes Signature
-keep class com.adapty.** { *; }
In the meantime, I’ve reached out to an engineering team member to get
further guidance on how to proceed with this issue. I'll update you as soon
as I have more information.
Thank you for your patience and understanding!
—
Reply to this email directly, view it on GitHub
<#5447 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJWON3A24JB52FYZ73W2G532QTD77AVCNFSM6AAAAABXMVD6USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRZGQZTQNRSGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: Alezanello]*Alezanello* left a comment
(FlutterFlow/flutterflow-issues#5447)
<#5447 (comment)>
Hello!
There is a solution for this issue, but it requires a manual change in the
Android folder. If you're deploying via GitHub or outside of FlutterFlow,
you can resolve it by editing the android/app/proguard-rules.pro file and
adding the following lines:
-keepattributes Signature
-keep class com.adapty.** { *; }
In the meantime, I’ve reached out to an engineering team member to get
further guidance on how to proceed with this issue. I'll update you as soon
as I have more information.
Thank you for your patience and understanding!
—
Reply to this email directly, view it on GitHub
<#5447 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJWON3A24JB52FYZ73W2G532QTD77AVCNFSM6AAAAABXMVD6USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRZGQZTQNRSGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Just as an update, you have to add these rules in the proguard for it to work, the ones above were incomplete: -keep class com.adapty.** { ; } I am unsure if this is just for the flutterflow version in the Adapty Library, which seems pretty old compared to the most up-to-date version, or all versions of the Adapty SDK. This does not solve the issue of it deploying from flutterflow though. Here is the source link: adaptyteam/AdaptySDK-React-Native#117 (comment) |
Can we access your project?
Current Behavior
I am using the Adapty library as my payment processor. I got around the library bug by copying all variables and data types into my app so I can use it myself.
Adapty works for iOS no problem, and several days ago, it was also working for Android. As of today, there is an initialization issue on Android. It seems that during the build configuration ProGuard/R8 are altering the Adapty code in such a way that it prevents initialization. Here is the debug log:
Calling Adapty.identify()...
=== AdaptyError Caught ===
Error Code: 20
Error Message: Adapty was not initialized
Returning: AdaptyErrorStruct
=== ADAPTY DEBUG LOGS ===
Activation error: PlatformException(error, TypeToken must be created with a type argument: new TypeToken<...>() {}; When using code shrinkers (ProGuard, R8, ...) make sure that generic signatures are preserved., null, java.lang.IllegalStateException: TypeToken must be created with a type argument: new TypeToken<...>() {}; When using code shrinkers (ProGuard, R8, ...) make sure that generic signatures are preserved.
at xa.a.b(SourceFile:1)
at xa.a.(SourceFile:1)
at com.adapty.internal.di.Dependencies$init$1$1.(Unknown Source:0)
at com.adapty.internal.di.Dependencies$init$1.invoke(SourceFile:2)
at com.adapty.internal.di.Dependencies$init$1.invoke(SourceFile:1)
at com.adapty.internal.di.DIObject.provide(Unknown Source:26)
at com.adapty.internal.di.Dependencies$init$17.invoke(SourceFile:1)
at com.adapty.internal.di.Dependencies$init$17.invoke(SourceFile:2)
at com.adapty.internal.di.DIObject.provide(Unknown Source:26)
at com.adapty.internal.di.Dependencies$init$15.invoke(SourceFile:1)
at com.adapty.internal.di.Dependencies$init$15.invoke(SourceFile:2)
at com.adapty.internal.di.DIObject.provide(Unknown Source:26)
at com.adapty.internal.di.Dependencies$init$7.invoke(SourceFile:1)
at com.adapty.internal.di.Dependencies$init$7.invoke(SourceFile:2)
at com.adapty.internal.di.DIObject.provide(Unknown Source:26)
at com.adapty.internal.di.Dependencies$init$5.invoke(SourceFile:1)
at com.adapty.internal.di.Dependencies$init$5.invoke(SourceFile:2)
at com.adapty.internal.di.DIObject.provide(Unknown Source:26)
at com.adapty.internal.di.Dependencies$init$47.invoke(SourceFile:1)
at com.adapty.internal.di.Dependencies$init$47.invoke(SourceFile:2)
at com.adapty.internal.di.DIObject.provide(Unknown Source:26)
at com.adapty.internal.di.Dependencies$init$48.invoke(SourceFile:1)
at com.adapty.internal.di.Dependencies$init$48.invoke(SourceFile:2)
at com.adapty.internal.di.DIObject.provide(Unknown Source:26)
at com.adapty.Adapty$special$$inlined$inject$adapty_release$default$1.invoke(Unknown Source:30)
at dd.s.getValue(SourceFile:1)
at com.adapty.Adapty.getAdaptyInternal(Unknown Source:2)
at com.adapty.Adapty.init(Unknown Source:23)
at com.adapty.Adapty.activate(SourceFile:3)
at com.adapty.flutter.AdaptyCallHandler.performActivate(SourceFile:1)
at com.adapty.flutter.AdaptyCallHandler.handleActivate(SourceFile:1)
at com.adapty.flutter.AdaptyCallHandler.onMethodCall(SourceFile:1)
at com.adapty.flutter.AdaptyFlutterPlugin.onMethodCall(SourceFile:1)
at wb.k$a.a(SourceFile:1)
at nb.c.l(SourceFile:1)
at nb.c.m(SourceFile:1)
at nb.c.i(SourceFile:1)
at nb.b.run(SourceFile:1)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:9063)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
)
[2025-02-18 13:24:53.536790] Starting getProfile call
[2025-02-18 13:24:53.536806] Calling Adapty().getProfile()
[2025-02-18 13:24:53.537813] Adapty error caught: Adapty was not initialized
[2025-02-18 13:24:59.405330] Starting getProfile call
[2025-02-18 13:24:59.405344] Calling Adapty().getProfile()
[2025-02-18 13:24:59.405833] Adapty error caught: Adapty was not initialized
Expected Behavior
Expecting Adapty to initialize as designed so that users can make purchases.
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
ITFfksmBw41PsfVY0a6JavpVlWARNjocTeUzlO1hdwwbI+PwEZYcfsnRckttcuqHe1VEBmH+pzgy+cLyjvDPO8E3H0mqQYRTz6ptUxDiRkWmaarWDoeOSXxBM8FWIGLH1ruskxRAPrNpLlYR1ziuF+6+b3qCf9qOYwx5e6fDbOY=
Visual documentation
Environment
Additional Information
No response
The text was updated successfully, but these errors were encountered: