codelab-exoplayer-intro icon indicating copy to clipboard operation
codelab-exoplayer-intro copied to clipboard

Uses gradle v 6.8, causes issues on first compile

Open Meerkov opened this issue 3 years ago • 1 comments

The error message tells you how to fix it (adding a file called gradle-wrapper.properties) but it would be nice if this project could compile out of the box. I couldn't go through the tutorial because there were numerous discrepancies.

Meerkov avatar Mar 05 '22 16:03 Meerkov

I was able to complete the codelab with the following adjustments.

1. Create a gradle-wrapper.properties file

First create a /gradle/wrapper directory in the root of the project. Then add a gradle-wrapper.properties file with the following contents.

distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

2. Use ExoPlayer version 2.13.3

The guide says to use 2.12.0. Don’t do that. Use version 2.13.3.

implementation 'com.google.android.exoplayer:exoplayer-core:2.13.3'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.13.3'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.13.3'

3. Fix the multidex issue

Fix the multidex issue by following https://stackoverflow.com/a/49645970/11809808.

Hopefully that helps!

paynerb avatar Mar 10 '22 14:03 paynerb