Skip to content
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

feat: fix proguard #737

Merged
merged 2 commits into from
Mar 22, 2021
Merged

feat: fix proguard #737

merged 2 commits into from
Mar 22, 2021

Conversation

myroid
Copy link

@myroid myroid commented Mar 22, 2021

Testing and Review Notes

in my flutter module's pubspec.yaml

flutter_inappwebview: ^5.1.0+4

run:

flutter build aar --release --no-debug --no-profile

add all aar files to the android project and build the release version, the installation will run, but it will crash.

Logs

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/pichillilorenzo/flutter_inappwebview/InAppWebViewFlutterPlugin;
    at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(Unknown Source:28)
    at com.test.flutter.base.flutter.GameFlutterActivity.configureFlutterEngine(GameFlutterActivity.kt:25)
    at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:180)
    at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:409)
    at android.app.Activity.performCreate(Activity.java:8121)
    at android.app.Activity.performCreate(Activity.java:8109)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3867)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4077)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2458)
    at android.os.Handler.dispatchMessage(Handler.java:110)
    at android.os.Looper.loop(Looper.java:219)
    at android.app.ActivityThread.main(ActivityThread.java:8387)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)

@pichillilorenzo
Copy link
Owner

Why did you set -keepclassmembers class com.pichillilorenzo.flutter_inappbrowser$JavaScriptBridgeInterface (flutter_inappbrowser) and not -keepclassmembers class com.pichillilorenzo.flutter_inappwebview$JavaScriptBridgeInterface (flutter_inappwebview)?
I think it's a typo mistake

@pichillilorenzo pichillilorenzo merged commit f9eed42 into pichillilorenzo:master Mar 22, 2021
@pichillilorenzo
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants