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

Cannot build my app after added the lib #19

Open
robsoncardozorebel opened this issue Jan 26, 2022 · 4 comments
Open

Cannot build my app after added the lib #19

robsoncardozorebel opened this issue Jan 26, 2022 · 4 comments

Comments

@robsoncardozorebel
Copy link

After adding the lib I could no longer build my app only if I disable shrink and minifyEnabled. Anyone can help?

`FAILURE: Build failed with an exception.

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

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 4s
Running Gradle task 'assembleProdRelease'... 4,7s
[!] 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
Gradle task assembleProdRelease failed with exit code 1

`

@lschmierer
Copy link
Owner

Unfortunately, I don't have much experience with code minification.
Are you able to reproduce this with the example app within this repo?

@lschmierer
Copy link
Owner

Hey @robsoncardozorebel, did you made any progress regarding this library and code minification?

@RationalEgoism
Copy link

@lschmierer
add to proguard file
-keepattributes Exceptions, Signature, InnerClasses, LineNumberTable

@lschmierer
Copy link
Owner

lschmierer commented Nov 1, 2022

@RationalEgoism thank you, will check it out later.
Can you elaborate what it does (how did you came up with these specific attributes to keep)?

Edit: Especially LineNumberTable sounds kinda specific to your project?

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

3 participants