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

R8: com.android.tools.r8.errors.b: Attribute Signature requires InnerClasses attribute. Check -keepattributes directive. #1624

Closed
gupta-shrinath opened this issue Jun 9, 2022 · 4 comments

Comments

@gupta-shrinath
Copy link

gupta-shrinath commented Jun 9, 2022

After adding proguard-rules.prothe following error occurred during the compilation in release build. I'm using the lastest version of the plugin.

Details

R8: com.android.tools.r8.errors.b: Attribute Signature requires InnerClasses attribute. Check -keepattributes directive.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:minifyReleaseWithR8'.

com.android.tools.r8.CompilationFailedException: Compilation failed to complete

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 33s

┌─ Flutter Fix ──────────────────────────────────────────────────────────────┐
│ [!] The shrinker may have failed to optimize the Java bytecode. │
│ To disable the shrinker, pass the --no-shrink flag to this command. │
│ To learn more, see: https://developer.android.com/studio/build/shrink-code
└────────────────────────────────────────────────────────────────────────────┘
Exception: Gradle task assembleRelease failed with exit code 1
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 AndroidGradleBuilder.buildGradleApp (package:flutter_tools/src/android/gradle.dart:444:7)

#2 AndroidGradleBuilder.buildApk (package:flutter_tools/src/android/gradle.dart:184:5)

#3 AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:577:7)

#4 FlutterDevice.runCold (package:flutter_tools/src/resident_runner.dart:505:33)

#5 ColdRunner.run (package:flutter_tools/src/run_cold.dart:71:28)

#6 AppDomain.launch. (package:flutter_tools/src/commands/daemon.dart:638:9)

#7 AppDomain.launch (package:flutter_tools/src/commands/daemon.dart:636:5)

#8 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:583:15)

#9 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1183:27)

#10 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#11 CommandRunner.runCommand (package:args/command_runner.dart:209:13)

#12 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)

#13 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#14 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)

#15 run.. (package:flutter_tools/runner.dart:62:9)

#16 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#17 main (package:flutter_tools/executable.dart:94:3)

`

@MaikuB
Copy link
Owner

MaikuB commented Jun 26, 2022

Please provide a link to a repo with a minimal app that can reproduce the issue.

For future reference, please use the bug report template reporting such issues going forward

@gupta-shrinath
Copy link
Author

I wasn't really sure about the bug report but for future I'll use it. The issue seems get resolved by setting the minifyEnabled and shrinkResources to false in release block of app/build.gradle but it leads to increase in app size (obvious). I'll try to share repo link due to confidentiality right now I can't

@MaikuB
Copy link
Owner

MaikuB commented Jun 26, 2022

Note I didn't ask for the repo for the actual project that you're working on. Rather, I asked for a repo with a minimal app that can reproduce the issue. These are different things

@MaikuB
Copy link
Owner

MaikuB commented Aug 17, 2022

Closing this as it's been a while now and no further information to reproduce the problem has been provided. Feel free to re-open if you get to do so

@MaikuB MaikuB closed this as completed Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants