MiniControllerFragment的Lcom/google/android/gms/common/intern



MiniControllerFragment出现以下错误,这是一个音乐播放器应用程序&使用CastOptions,在升级到最新等级后,我遇到了这个问题。如果有人早些时候面临同样的问题&找到任何解决方案,然后请求您也帮助我。

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"/> 

应用程序构建.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'

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

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

最新更新