llfbandit / app_links

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
https://pub.dev/packages/app_links
Apache License 2.0
176 stars 68 forks source link

ERROR:R8: com.android.tools.r8.internal.XI0: Attribute InnerClasses requires EnclosingMethod attribute. Check -keepattributes directive. #86

Closed ufukhawk closed 5 months ago

ufukhawk commented 6 months ago

When minifyEnabled true shrinkResources true, the apk cannot be created.

if i remove package , i can create APK file.

app_links: ^3.5.0

Error : ERROR:R8: com.android.tools.r8.internal.XI0: Attribute InnerClasses requires EnclosingMethod attribute. Check -keepattributes directive.

FAILURE: Build failed with an exception.

ufukhawk commented 6 months ago

Any update ?

llfbandit commented 5 months ago

https://github.com/microg/SafeParcel/blob/master/safe-parcel/proguard.txt

Those rules should fix your issue.

ufuk-sahin-alg commented 5 months ago

@llfbandit not woking.

`ERROR:R8: com.android.tools.r8.internal.XI0: Attribute InnerClasses requires EnclosingMethod attribute. Check - 
keepattributes directive.

FAILURE: Build failed with an exception.

* What went wrong:
 Execution failed for task ':app:minifyProdReleaseWithR8'.
  > com.android.tools.r8.CompilationFailedException: Compilation failed to complete
llfbandit commented 5 months ago

I guess there are missing pieces here. I can't reproduce the issue with the example project.

Anyway, did you add at least the directive asked?

-keepattributes EnclosingMethod
ufukhawk commented 5 months ago

Thanks fixed.