frontyard / cordova-plugin-exoplayer

Media player plugin for Cordova that uses Google's ExoPlayer
MIT License
54 stars 69 forks source link

Build error #93

Closed Nemanja02 closed 2 years ago

Nemanja02 commented 3 years ago

I get this error when I try to build project

`symbol: class Format location: package com.google.android.exoplayer2 C:\Users\Nemanja\Desktop\MaxPlayer\platforms\android\app\src\main\java\co\frontyard\cordova\plugin\exoplayer\Player.java:321: error: cannot find symbol MediaSource subtitleSource = new SingleSampleMediaSource(subtitleUri, httpDataSourceFactory, textFormat, C.TIME_UNSET); ^ symbol: class MediaSource location: class Player C:\Users\Nemanja\Desktop\MaxPlayer\platforms\android\app\src\main\java\co\frontyard\cordova\plugin\exoplayer\Player.java:321: error: cannot find symbol MediaSource subtitleSource = new SingleSampleMediaSource(subtitleUri, httpDataSourceFactory, textFormat, C.TIME_UNSET); ^ symbol: class SingleSampleMediaSource location: class Player C:\Users\Nemanja\Desktop\MaxPlayer\platforms\android\app\src\main\java\co\frontyard\cordova\plugin\exoplayer\Player.java:321: error: cannot find symbol MediaSource subtitleSource = new SingleSampleMediaSource(subtitleUri, httpDataSourceFactory, textFormat, C.TIME_UNSET); ^ symbol: variable C location: class Player C:\Users\Nemanja\Desktop\MaxPlayer\platforms\android\app\src\main\java\co\frontyard\cordova\plugin\exoplayer\Player.java:322: error: cannot find symbol return new MergingMediaSource(mediaSource, subtitleSource); ^ symbol: class MergingMediaSource location: class Player C:\Users\Nemanja\Desktop\MaxPlayer\platforms\android\app\src\main\java\co\frontyard\cordova\plugin\exoplayer\Player.java:333: error: cannot find symbol return MimeTypes.TEXT_VTT; ^ symbol: variable MimeTypes location: class Player C:\Users\Nemanja\Desktop\MaxPlayer\platforms\android\app\src\main\java\co\frontyard\cordova\plugin\exoplayer\Player.java:337: error: cannot find symbol return MimeTypes.APPLICATION_SUBRIP; ^ symbol: variable MimeTypes location: class Player C:\Users\Nemanja\Desktop\MaxPlayer\platforms\android\app\src\main\java\co\frontyard\cordova\plugin\exoplayer\Player.java:354: error: cannot find symbol DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter(); ^ symbol: class DefaultBandwidthMeter location: class Player C:\Users\Nemanja\Desktop\MaxPlayer\platforms\android\app\src\main\java\co\frontyard\cordova\plugin\exoplayer\Player.java:354: error: cannot find symbol DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter(); ^ symbol: class DefaultBandwidthMeter location: class Player C:\Users\Nemanja\Desktop\MaxPlayer\platforms\android\app\src\main\java\co\frontyard\cordova\plugin\exoplayer\Player.java:355: error: cannot find symbol MediaSource mediaSource = getMediaSource(uri, bandwidthMeter); ^ symbol: class MediaSource location: class Player C:\Users\Nemanja\Desktop\MaxPlayer\platforms\android\app\src\main\java\co\frontyard\cordova\plugin\exoplayer\Player.java:407: error: cannot find symbol null != exoPlayer ? exoPlayer.getPlaybackState() : SimpleExoPlayer.STATE_ENDED, ^ symbol: variable SimpleExoPlayer location: class Player 90 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details. `

naja7host commented 3 years ago

same error here, any fix or solution to make the build successfully?

naja7host commented 3 years ago

It appear that the plugin isn't compiling with cordova 8, 9 and the latest version 10 .

frontyard commented 2 years ago

Plugin version 2.5.6 now works with: cordova: 11.0.0 (latest) cordova-android: 9.1.0 exoplayer: 2.9.6

frontyard commented 2 years ago

Make sure you are using supported versions of all the dependencies.

naja7host commented 2 years ago

Hello, please can you update the npm version also

cordova-plugin-exoplayer 2.5.4 • Public • Published 4 years ago