Android 3.1.1 - Failed Resolution Of: Lcom/Google/Android/Gms/Common/Internal/Zzbq;

Android 3.1.1 - Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;

Try adding this dependency to your gradle file:

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

Also you should use the same versions for the support and play services libraries. And you should avoid using "+" for latest version. Change this part:

implementation 'com.google.android.gms:play-services-maps:+'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services:+'
implementation 'com.google.android.gms:play-services-ads:+'

into this:

implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.android.gms:play-services-ads:12.0.1'

EDIT: You may also add this part to your app level gradle file and try again. I did not see anyone tried this but it may work.

allprojects {
repositories {
//...
}

subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.google.android.gms'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "12.0.1"
}
}
}
}
}

2ND UPDATE: Just seen this, the dependency below, covers all the others, then it may cause a duplication issue. Remove the other dependencies and leave this one:

implementation 'com.google.android.gms:play-services:12.0.1'

Failed resolution of: Lcom/google/android/gms/common/internal/zzbq for MiniControllerFragment

You should upgrade your gms:play-services-cast-framework version.

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

Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/util/Function;

I see a whole mess of problems in your build.gradle.

The first category of issues is that most of your dependencies are pretty outdated.

  • The Android API 27 support libraries are on 27.1.1, not 27.0.2.
  • firebase-firestore is on 17.1.2, not 15.0.0.
  • firebase-ui-firestore is on 4.2.1, not 2.1.1.
  • glide is on 4.8.0, not 3.7.0.

Dependency versions should be up-to-date in general, but absolutely must be up-to-date if they're from Google. Otherwise you run into exactly the type of error you have.

The second problem is that you implement firebase-firestore twice, once with implementation and again with api. Remove one or the other.

A handy tip: if a dependency is highlighted in yellow, that means it's outdated! Click the text, hit Alt+Enter and choose the option to update it to the latest version.

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbo;

Add maven { url 'https://maven.google.com' } inside your buildscript in application gradle file as follow:

buildscript {
repositories {
jcenter()
google()
//or
// maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'net.hockeyapp.android:HockeySDK:4.1.0'
classpath 'com.google.gms:google-services:3.1.1' //use latest plugin version

}
}

then clean and rebuild project.

Add latest firebase dependencies version

 compile "com.google.firebase:firebase-auth:16.0.1"
compile "com.google.firebase:firebase-database:16.0.1"
compile "com.google.firebase:firebase-messaging:16.0.1"
compile "com.google.firebase:firebase-storage:16.0.1"
compile "com.google.firebase:firebase-analytics:16.0.1"
compile "com.google.android.gms:play-services-base:15.0.1"

follow this link for latest version of firebase and for google play service follow this

React Native 0.60 - Unable to Run App with react-native run-android: java.lang.NoClassDefFoundError

Solution is to use the new bundle/build process for Android .aab and .apk files, as shown on React Native documentation. Current process that is throwing errors is as follows:

cd android
./gradlew clean
cd ..
bundleAPK (`react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/`)
buildReleaseAPK (`cd ./android && ./gradlew assembleRelease && cd ..`
installReleaseAPKAlt (`adb install -r ./android/app/build/outputs/apk/release/app-release.apk`)

When successful, this generates the .apk file and installs it on device, similar to downloading/installing directly from the Play Store. Various bugs in build process are preventing this, as detailed above.

React Native documentation suggest to use a different set of commands to generate .aab file, and from that the .apk:

cd android
./gradlew clean
./gradlew bundleRelease
cd .. && react-native run-android --variant=release

Complete details can be found at https://facebook.github.io/react-native/docs/signed-apk-android#generating-the-release-apk. Information about generating Signed APK included since previous implementation.

Using this approach, .aab and .apk files are generated and installed on device, but another issue arises in lack of ic_launcher_rounded. See React Native 0.60 - ic_launcher_round missing for Release Bundle/Build for details. Marking question as closed when allowed.



Related Topics



Leave a reply



Submit