java.lang.ClassNotFoundException: Didn't find class "util.CastOptionsProvider"
See original GitHub issueHi, I have a problem using the cast to Chromecast option.
When I call:
PlayServicesUtils.checkGooglePlayServicesAvailability(this, googlePlayServicesAvailabilityRequestCode, this::initChromecast);
I receive the error:
java.lang.ClassNotFoundException: Didn’t find class “util.CastOptionsProvider”
That is caused by -
private Unit initChromecast() {
new ChromecastYouTubePlayerContext(
CastContext.getSharedInstance(this).getSessionManager(),
new SimpleChromecastConnectionListener()
);
return Unit.INSTANCE;
}
More precisely by CastContext.getSharedInstance.
I have to mention that if I remove the cast button, the player works just fine. Am i missing something?
I have to mention that in my build.gradle I have those lines:
implementation 'com.pierfrancescosoffritti.androidyoutubeplayer:core:8.0.1'
implementation 'com.pierfrancescosoffritti.androidyoutubeplayer:chromecast-sender:0.15'
implementation 'com.android.support:mediarouter-v7:26.1.0'
implementation 'com.google.android.gms:play-services-cast-framework:15.0.1'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.50'
Thank you!
PS: the cast doesn’t work from the app existing in play store either. I have tested with youtube and I can cast to my Chromecast directly from their app.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
java.lang.ClassNotFoundException: Didn't find class on path
This is a solution for the Eclipse IDE. There is no default 'project.properties' file in Android Studio. It can be created though. –...
Read more >Integrating FireStick Cast into Android App with Chromecast
Learn how to integrate FireStick Cast into Android App with Chromecast ... Caused by: java.lang.ClassNotFoundException: Didn't find class ...
Read more >Integrate Cast Into Your Android App - Google Developers
This developer guide describes how to add Google Cast support to your Android sender app using the Android Sender SDK. Note: We recommend...
Read more >ClassCastException after updating to R8 2.0.59 (Android ...
Fatal Exception: java.lang.ClassCastException: i2 cannot be cast to ii8$a at io.ktor.util.StringValuesSingleImpl.forEach(StringValuesSingleImpl.java:106) at ...
Read more >Didn't find class "com.google.android.gms.measurement ...
at com.google.android.gms.ads.internal.util.b.run(:com.google.android.gms. ... java.lang.NoClassDefFoundError: Class not found using the boot class loader; ...
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
Hello I have the same problem in java, I have the application in Google Cast SDK Developer Console. I throw the error E/CastContext: Failed to load module from Google Play services. Cast will not work properly. Might due to outdated Google Play services. Ignoring this failure silently. I’m new to learning. And I loved this library where you can control everything congratulations.
The fully qualified name of the implementation of OptionsProvider must be provided as a metadata in the AndroidManifest.xml with key com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME.
No worries - I am looking into it.