-
Notifications
You must be signed in to change notification settings - Fork 6k
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
shrink build fails #4890
Comments
I can not reproduce the issue on the ExoPlayer demo app. I copied your configuration to demos/main/build.gradle. The app builds and runs fine. If you can reproduce the issue on the demo app please let us know. |
It looks like your setup isn't properly handling default methods (e.g. DataSource.getResponseHeaders), which is a Java 8 feature. It might be a good idea to try updating Android Studio, the version of build tools that you're using etc. I suspect doing this will resolve the issue. If you happen to be including ExoPlayer as source, please also see the RELEASE NOTES for an extra step. |
can't reproduce with the demo either... I'm using an compiled dependancy using latest Android Studio and build tools. I'll try include ExoPlayer a source dependancy |
You really shouldn't need to include it as a source dependency. That's just making things more difficulty. What |
Actually, I think the important thing is probably the |
bah my project doesn't like to use ExoPlayer as source |
buildToolsVersion: '28.0.3' adding |
I think it sounds a like a pro-guard or some other tool issue, in that case? I'm going to close this for now, since it's only a single report. It still seems possible something in your toolchain is out of date. If we get additional reports then we'll look at getting the proguard config to the library, so developers don't need to figure this out for themselves. Thanks for reporting how to fix it! |
I have the same issue with the same buildTools and gradle version and an up to date Android Studio installation (3.2). @loki666 s dontwarn directive fixed the build error, but causes the exo player instance to throw exceptions:
I am pretty sure the exceptions is caused by the shrinking but I cannot confirm right now, because I've hit the DEX limit. I will report back as soon as I find out more. |
I don't have this crash, but I'm not using FileDataSource |
It seems more likely that the file uri is incorrect, given the stack trace. |
You were right, my issue was related to loading subtitles and had nothing to do with proguard. I am sorry for causing confusion. In the process of finding this out I made a minimal test app to reproduce the Proguard issue: https://github.com/cemrich/ExoTestApp-4890. You can edit https://github.com/cemrich/ExoTestApp-4890/blob/master/app/proguard-rules.pro and comment out the single line to provoke the error when doing a debug build. |
Thanks. I was able to reproduce a problem. It seems shrinking has a problem with default methods being called in implementing subclasses using |
Just not doing it seems simplier and more obviously correct than suppressing the warnings in our proguard file. Issue: #4890 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=217675527
Just not doing it seems simplier and more obviously correct than suppressing the warnings in our proguard file. Issue: #4890 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=217675527
Issue description
when shrinking a build (not using proguard), the build fails
Reproduction steps
using exoPlayer 2.9.0
add to build.gradle
Version of ExoPlayer being used
2.9.0
Device(s) and version(s) of Android being used
emulator API 26
A full bug report captured from the device
The text was updated successfully, but these errors were encountered: