"cannot resolve symbol: util" in ExoPlayer 2.6.1 - previously worked fine
See original GitHub issueSince a few days ago, our projects that use ExoPlayer 2.6.1 no longer compile. Android Studio now gives a cannot resolve symbol: util
error even though they have previously compiled without problems.
Steps to reproduce:
- Create a new project in Android Studio.
- Add ExoPlayer 2.6.1 as a build dependency by putting
implementation 'com.google.android.exoplayer:exoplayer:2.6.1'
in thebuild.gradle
file for the application module. - Create a new Java class and import the
com.google.android.exoplayer2.util.Util
package.
Expected behavior:
Gradle should sync and the app should compile.
Actual behavior:
Android Studio throws up a cannot find symbol: util
error. Changing the Gradle import to
implementation 'com.google.android.exoplayer:exoplayer-core:2.6.1'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.6.1'
resolves the problem.
As I mentioned earlier, our projects that use ExoPlayer 2.6.1 previously worked without any issues. The repository shows that ExoPlayer 2.6.1 does have a util
folder. Has there been a change in the Gradle package?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Exoplayer 2.17.1 Cannot resolve symbol ExoPlayerFacory ...
I am new to android dev and I am trying to make an app. I want to display a list of videos and...
Read more >Unable to resolve com.google.android.exoplayer2 after ...
My project is using com.google.android.exoplayer2. Until today I was at gradle 4.10.1 (android gradle plugin 3.3.1) - all fine.
Read more >Com.Squareup.Retrofit2.Converter-Gson:2.3.0 - ADocLib
Android Studio now gives a cannot resolve symbol: util error even though they Add ExoPlayer 2.6.1 as a build dependency by putting Util...
Read more >Legal Notices for Astro App on iOS and Android - Amazon.com
If you believe that your work has been copied in a way that constitutes copyright infringement, please provide Amazon's copyright agent the written...
Read more >Download Diff File - Codeberg
Conversations only introduced the offical backup feature in 2.4.0 after making sure the *OMEMO self healing* mechanism introduced in 2.3.11 works fine.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m using the following versions:
Android Studio 3.4 Gradle plug-in 2.3.3 (downgraded from latest) Gradle 4.1 (downgraded from latest)
I’m having the same error. As @ixfd64 said, I could workaround it by downgrading Gradle Android plugin from
3.4.0
to3.2.0
and gradle-wrapper.properties from5.1.1
to4.10.1
. This is the last configuration that workedbuild.gradle
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
app/build.gradle
implementation 'com.google.android.exoplayer:exoplayer:r2.5.3'
After downgrading Gradle, exoplayer versions
r2.5.2
,r2.5.3
,r2.5.4
seem to work fine, but none of them works with Gradle3.4.0
- gradle-wrapper5.1.1
. Has anyone found a way to make it work after upgrading Gradle?Thanks in advance!