android / android/codelab-exoplayer-intro

Codelab seems really outdated and doesn't build out of the box.

Open
#81 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
235
Forks
129
PR merge metrics
No merged PRs in 30d

Description

A fresh clone of the repository and subsequent building results in the following error:

```
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.version-check'.
> Minimum supported Gradle version is 7.0.2. Current version is 6.8. If using the gradle wrapper, try editing the distributionUrl in /Users/.../AndroidStudioProjects/exoplayer-intro/gradle/wrapper/gradle-wrapper.properties to gradle-7.0.2-all.zip
```

Going into Project Structure and setting the gradle version to something above 7.0.2 does fix the problem. I was able to get it to build by creating a gradle/wrapper directory and adding a gradle-wrapper.properties file with the following content:

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

Next I was getting the following error: "This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered." This I fixed by removing the buildToolsVersion field from the common.gradle file.

Lastly, the ExoPlayer dependencies weren't resolving. This I fixed by adding jcenter() as a repository to allprojects.

Even with this, I'm still getting some warnings that there are references to both AndroidX and the old support library. However, following the above steps, I was able to follow the codelab and run it successfully.

Contributor guide

Open the contributing guide

Research direction

Reproduce the fresh-clone build failure, then inspect gradle/wrapper/gradle-wrapper.properties and common.gradle, along with the project’s dependency repository configuration. Done means the codelab builds and runs from a fresh checkout without the manual Gradle, SDK, dependency, or library-compatibility changes described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.