eneim / toro

Video list auto playback made simple, specially built for RecyclerView
Apache License 2.0
1.42k stars 253 forks source link

Cannot resolve symbol 'PlayerView' #443

Closed san-android closed 5 years ago

san-android commented 5 years ago

I have implemented toro player dependances

implementation "im.ene.toro3:toro:3.6.2.2804" implementation "im.ene.toro3:toro-ext-exoplayer:3.6.2.2804"

This was working properly but it has been showing the error for a few days that it can not resolve PlayerView.

In that activity it also showing error with

import com.google.android.exoplayer2.ui.PlayerView;

eneim commented 5 years ago

@san-android Where does it shows the issue? Do you also have exoplayer in gradle dependency?

san-android commented 5 years ago

Error showing in my Recyclerview Adapter

My dependencies are

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:multidex:1.0.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    implementation 'com.google.firebase:firebase-core:16.0.6'
    implementation 'com.google.firebase:firebase-messaging:17.3.4'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'

    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'

    implementation 'com.facebook.android:facebook-android-sdk:[4,5)'

    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

    implementation "im.ene.toro3:toro:3.6.2.2804"
    implementation "im.ene.toro3:toro-ext-exoplayer:3.6.2.2804"

    implementation 'com.hbb20:ccp:2.2.3'

    implementation 'com.google.android.gms:play-services-analytics:16.0.6'
    implementation 'com.google.android.gms:play-services-ads:16.0.0'

    implementation 'de.hdodenhof:circleimageview:3.0.0'

    implementation 'commons-io:commons-io:2.6'
}
eneim commented 5 years ago

@san-android please add this and try again

implementation 'com.google.android.exoplayer:exoplayer-ui:2.8.4'
san-android commented 5 years ago

It solves PlayerView but for using it, this methods are not valid

player.setControlDispatcher(new ExoPlayerDispatcher(selector, this));
player.getPlayer().seekTo(0);
player.getPlayer().setPlayWhenReady(false);
eneim commented 5 years ago

@san-android it seems that you lack of all ExoPlayer dependencies. Please try this setup: this line

eneim commented 5 years ago

Note that it will add all exoplayer package.

san-android commented 5 years ago

Great. Thanks a lot, it works fine now...