gpt4 book ai didi

java - : Lcom/google/android/gms/common/internal/zzbq; 解析失败

转载 作者:行者123 更新时间:2023-11-29 23:49:48 28 4
gpt4 key购买 nike

我在这里检查了之前的问题,它似乎是相互冲突的依赖项,但是我似乎找不到错误

Error
06-23 16:41:14.542 7770-7770/net.simplifiedlearning.firebaseauth E/AndroidRuntime: FATAL EXCEPTION: main
Process: net.simplifiedlearning.firebaseauth, PID: 7770
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;
at com.google.firebase.storage.FirebaseStorage.getInstance(Unknown Source:11)
at net.simplifiedlearning.firebaseauth.ProfileActivity.uploadImageToFirebaseStorage(ProfileActivity.java:250)
at net.simplifiedlearning.firebaseauth.ProfileActivity.onActivityResult(ProfileActivity.java:240)
at android.app.Activity.dispatchActivityResult(Activity.java:7235)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4335)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4382)
at android.app.ActivityThread.-wrap19(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1654)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:251)
at android.app.ActivityThread.main(ActivityThread.java:6572)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList[[zip file "/data/app/net.simplifiedlearning.firebaseauth-kxzC1xsQNY2FvbVhXuPXPg==/base.apk"],nativeLibraryDirectories=[/data/app/net.simplifiedlearning.firebaseauth-kxzC1xsQNY2FvbVhXuPXPg==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.firebase.storage.FirebaseStorage.getInstance(Unknown Source:11) 
at net.simplifiedlearning.firebaseauth.ProfileActivity.uploadImageToFirebaseStorage(ProfileActivity.java:250) 
at net.simplifiedlearning.firebaseauth.ProfileActivity.onActivityResult(ProfileActivity.java:240) 
at android.app.Activity.dispatchActivityResult(Activity.java:7235) 
at android.app.ActivityThread.deliverResults(ActivityThread.java:4335) 
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4382) 
at android.app.ActivityThread.-wrap19(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1654) 
at android.os.Handler.dispatchMessage(Handler.java:105) 
at android.os.Looper.loop(Looper.java:251) 
at android.app.ActivityThread.main(ActivityThread.java:6572) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 

Build.gradle Module:app

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "net.simplifiedlearning.firebaseauth"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.android.support:support-vector-drawable:27.1.1'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'

implementation 'com.android.support:appcompat-v7:26.1.1'
implementation 'com.android.support:design:26.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.firebase:firebase-client-android:2.5.2'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'

//maps
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
compile 'com.google.android.gms:play-services-ads:15.0.1'

//personal firebase database
implementation 'com.firebaseui:firebase-ui-database:3.3.1'
implementation 'com.firebaseui:firebase-ui-auth:3.3.1'

implementation 'com.android.support:multidex:1.0.3'

api 'com.google.firebase:firebase-messaging:17.0.0'

}
//apply plugin: 'com.google.gms.google-services'

apply plugin: 'com.google.gms.google-services'

这是我的 build.gradle 项目:appname:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files


classpath 'com.google.gms:google-services:4.0.1'
}
}

allprojects {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

构建成功,但是当我尝试为我的配置文件选择链接到 firebase 的图像时它崩溃了。

最佳答案

不确定它是否有效,但请尝试将以下内容添加到您的 gradle.properties 文件中:

googlePlayServicesVersion=11.0.4

当我遇到同样的错误时为我工作。

关于java - : Lcom/google/android/gms/common/internal/zzbq; 解析失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51002744/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com