-
Notifications
You must be signed in to change notification settings - Fork 48
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
[Question]: How to fix release crash #186
Comments
Hello, @MitsuraIvan Based on the error you've described, it seems that the PwFragmentInboxBinding class is being stripped out during the build process, which leads to the NoClassDefFoundError in your release build.
Please try adding these rules to your ProGuard configuration and let us know if the issue persists. |
Hi, yes, issue still there, same class.
fixes issue, seems like error message is misleading and pushwoosh needs viewBindings enabled inside module, thank you for the help anyways :) |
Could you please elaborate on this? This line is already added to build.gradle of pushwoosh-inbox-ui module, and viewBindings are not used in any other module of our SDK. Could you please let me know to build.gradle of what particular module did you have to add this line? |
I have flutter app, with android project, basically, containing nothing, one base module that starts flutter activity + external sdk's activities, like zendesk chat and pushwoosh inbox, added buildFeatures{...} to main and only android module. from notable stuff, I also have there
firebase analytics + multidex + zendesk + pushwoosh + appsflyer + android lifecycle gradle.properties org.gradle.jvmargs=-Xmx16g -XX:MaxMetaspaceSize=16g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 |
Documentation
Question
gradle wrapper:
distributionUrl=https://services.gradle.org/distributions/gradle-8.3-bin.zip
project build.gradle:
proguard:
pushwoosh
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public ;
}
-keep class com.pushwoosh.* { ; }
-keep class com.arellomobile.* { ; }
-dontwarn com.pushwoosh.*
-dontwarn com.arellomobile.**
build.gradle
mBuildToolsVersion=34.0.0
mTargetSdkVersion=34
mCompileSdkVersion=34
mMinSdkVersion=23
error(release signed app only):
Process: x.x.x PID: 12457
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/pushwoosh/inbox/ui/databinding/PwFragmentInboxBinding;
at com.pushwoosh.inbox.ui.presentation.view.fragment.InboxFragment.onCreateView(InboxFragment.kt:7)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:20)
at androidx.fragment.app.t.f(FragmentStateManager.java:189)
at androidx.fragment.app.t.m(FragmentStateManager.java:117)
at androidx.fragment.app.n.d0(FragmentManager.java:278)
at androidx.fragment.app.n.d1(FragmentManager.java:85)
at androidx.fragment.app.n.a0(FragmentManager.java:22)
at androidx.fragment.app.n.S(FragmentManager.java:43)
at androidx.fragment.app.n.y(FragmentManager.java:12)
at androidx.fragment.app.i.c(FragmentController.java:5)
at androidx.fragment.app.e.onStart(FragmentActivity.java:21)
at androidx.appcompat.app.d.onStart(AppCompatActivity.java:1)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1582)
at android.app.Activity.performStart(Activity.java:8628)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3807)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:225)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:205)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:177)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: java.lang.ClassNotFoundException: com.pushwoosh.inbox.ui.databinding.PwFragmentInboxBinding
at com.pushwoosh.inbox.ui.presentation.view.fragment.InboxFragment.onCreateView(InboxFragment.kt:7)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:20)
at androidx.fragment.app.t.f(FragmentStateManager.java:189)
at androidx.fragment.app.t.m(FragmentStateManager.java:117)
at androidx.fragment.app.n.d0(FragmentManager.java:278)
at androidx.fragment.app.n.d1(FragmentManager.java:85)
at androidx.fragment.app.n.a0(FragmentManager.java:22)
at androidx.fragment.app.n.S(FragmentManager.java:43)
at androidx.fragment.app.n.y(FragmentManager.java:12)
at androidx.fragment.app.i.c(FragmentController.java:5)
at androidx.fragment.app.e.onStart(FragmentActivity.java:21)
at androidx.appcompat.app.d.onStart(AppCompatActivity.java:1)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1582)
at android.app.Activity.performStart(Activity.java:8628)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3807)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:225)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:205)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:177)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
The text was updated successfully, but these errors were encountered: