Android Question Casty Example Problem

dank

Member
Licensed User
Longtime User
Hi. I'm trying to run the Casty app, and I get the following error:

java.lang.NoClassDefFoundError: Failed resolution of: Ldagger/internal/Preconditions;
at com.google.android.datatransport.runtime.DaggerTransportRuntimeComponent$Builder.setApplicationContext(com.google.android.datatransport:transport-runtime@@2.2.1:106)
at com.google.android.datatransport.runtime.DaggerTransportRuntimeComponent$Builder.setApplicationContext(com.google.android.datatransport:transport-runtime@@2.2.1:101)
at com.google.android.datatransport.runtime.TransportRuntime.initialize(com.google.android.datatransport:transport-runtime@@2.2.1:77)
at com.google.android.gms.cast.framework.CastContext.zzb(com.google.android.gms:play-services-cast-framework@@18.1.0:181)
at com.google.android.gms.cast.framework.zzb.onSuccess(Unknown Source:8)
at com.google.android.gms.tasks.zzm.run(com.google.android.gms:play-services-tasks@@17.0.2:4)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.google.android.gms.internal.tasks.zzb.dispatchMessage(com.google.android.gms:play-services-tasks@@17.0.2:6)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ClassNotFoundException: dagger.internal.Preconditions

Any clues as to how to solve it?
 

DonManfred

Expert
Licensed User
Longtime User
The example i do use here has the following imports

#AdditionalJar: com.google.android.gms:play-services-cast-framework
#AdditionalJar: casty.aar
#AdditionalJar: androidx.core:core
#AdditionalJar: dagger-android-2.23.2.aar
#AdditionalJar: dagger-2.23.2
#AdditionalJar: javax.inject-1

Do you have the same in your project?

Upload the exampleproject you are running.
 
Upvote 0

dank

Member
Licensed User
Longtime User
The example i do use here has the following imports



Do you have the same in your project?

Upload the exampleproject you are running.

Thanks. Now I don't get the error, but the app doesn't find my Chromecast. I have a couple of stupid questions:

1. When you register the application, do you choose Custom Receiver or Styled Media Receiver? I assume Custom; so, what URL do you enter?
2. I assume you need to add your Chromecast device under Cast Receiver devices. Correct?

I'm using your example program with the added imports you indicated were needed. I really appreciate your help!

-Dan
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I have a couple of stupid questions:
Please create a new Thread for any new Question.

This time i´ll answer in this thread.
1. When you register the application, do you choose Custom Receiver or Styled Media Receiver? I assume Custom; so, what URL do you enter?
I entered a Url of one of my Domains. I created a subdomain for my Cast-Tests.
2. I assume you need to add your Chromecast device under Cast Receiver devices. Correct?
I´m not sure that i remember... Did it one time.
I know that i did created a App in their console.
I remember i did pay a onetimefee of $us 5 or so.
 
Upvote 0
Top