无法解决以下问题:MiniControllerFragment的Lcom / google / android / gms / common / internal / zzbq

时间:2020-11-09 12:21:25

标签: android

我收到MiniControllerFragment的以下错误,这是一个音乐播放器应用程序,并且使用CastOptions,升级到最新的gradle后,出现了此问题。 如果有人早些时候遇到了同样的问题并找到了解决方案,那就请您也帮我。

 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList[[zip file "/data/app/PACKAGE_NAME-btPK9-mYnIhfqmckE-riFw==/base.apk"],nativeLibraryDirectories=[/data/app/PACKAGE_NAME-btPK9-mYnIhfqmckE-riFw==/lib/arm64, /data/app/PACKAGE_NAME-btPK9-mYnIhfqmckE-riFw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]

活动时

  FrameLayout contentRoot = findViewById(R.id.content_root);
            contentRoot.addView(LayoutInflater.from(this)
                    .inflate(R.layout.fragment_cast_mini_controller, null), params);

下面是布局

<?xml version="1.0" encoding="utf-8"?>
<fragment
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_alignParentBottom="true"
    android:id="@+id/castMiniController"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"

    android:layout_gravity="bottom"
    android:gravity="bottom"
    android:visibility="gone"
    class="com.google.android.gms.cast.framework.media.widget.MiniControllerFragment"/> 

app build.gradle

  implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "com.android.support:appcompat-v7:27.0.2"
    implementation "com.android.support:design:27.0.2"
    implementation "com.android.support:cardview-v7:27.0.2"
    implementation "com.android.support:recyclerview-v7:27.0.2"
    implementation "com.android.support:palette-v7:27.0.2"
    implementation "com.android.support:percent:27.0.2"
    implementation 'com.android.support:multidex:1.0.3'

    implementation "com.android.support:mediarouter-v7:27.0.2"
    implementation 'com.google.android.gms:play-services-cast-framework:11.6.0'

    implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
    implementation 'net.steamcrafted:materialiconlib:1.1.4'
    implementation 'com.squareup.retrofit:retrofit:1.9.0'
    implementation 'com.squareup.okhttp:okhttp-urlconnection:2.3.0'
    implementation 'com.squareup.okhttp:okhttp:2.3.0'
    implementation 'com.google.code.gson:gson:2.3'
    implementation 'de.Maxr1998:track-selector-lib:1.2'



    implementation 'com.afollestad.material-dialogs:core:0.9.0.2'
    implementation 'com.afollestad.material-dialogs:commons:0.9.0.2'

    implementation 'com.anjlab.android.iab.v3:library:1.0.+'
    implementation 'org.nanohttpd:nanohttpd:2.3.1'

    implementation 'com.google.firebase:firebase-analytics:17.4.1'
    implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
    implementation 'com.google.firebase:firebase-core:17.0.0'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:core:1.1.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.0'
    androidTestImplementation 'androidx.test:runner:1.2.0-alpha05'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha05'

1 个答案:

答案 0 :(得分:1)

您应该升级您的 gms:play-services-cast-framework 版本。

implementation 'com.google.android.gms:play-services-cast-framework:15.0.0'