Noureddine Ouertani Noureddine Ouertani - 5 months ago 59
Android Question

Adapting dependencies after downgrading Google Play Sevices

What should I compile instead of:

compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.google.android.gms:play-services-maps:9.0.2'
compile 'com.google.android.gms:play-services-location:9.0.2'
compile 'com.google.android.gms:play-services-base:9.0.2'
compile 'com.android.support:multidex:1.0.0'


in my
dependencies
in
build.gradle (Module:app)
when I downgraded Google Play Services from 9.0.83 to 8.1.18 manually? My purpose was to avoid this log error:


06-24 18:50:24.488 7128-7759/com.noureddine_ouertani.www.wocelli50
E/DynamiteModule: Failed to load module descriptor class: Didn't find
class
"com.google.android.gms.dynamite.descriptors.com.google.android.gms.googlecertificates.ModuleDescriptor"
on path: DexPathList[[zip file
"/data/app/com.noureddine_ouertani.www.wocelli50-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64,
/system/lib64]]


@Er. Arjun saini : I get this error. (My Manifest file was correctly configured.)

enter image description here

I'm trying to clean with the following build.gradle now:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "com.noureddine_ouertani.www.wocelli50"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
//incremental = true;
preDexLibraries = false
javaMaxHeapSize "4g"
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-annotations:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
//compile 'com.google.android.gms:play-services:9.0.2'
//compile 'com.google.android.gms:play-services-maps:9.0.2'
//compile 'com.google.android.gms:play-services-location:9.0.2'
//compile 'com.google.android.gms:play-services-base:9.0.2'
//compile 'com.android.support:multidex:1.0.0'

compile 'com.android.support:multidex:1.0.1'

compile 'com.google.android.gms:play-services:+' //remove others instead of

}


Compiling works. However my app wants me to update Google Play Services when I move to my route tracking activity. I also see no map anymore.

enter image description here

I updated Google Play Services after downgrading them and landed here.

Answer

Try to my Answer by Update the code by this

First Compile the build with

compile 'com.android.support:multidex:1.0.1'

compile 'com.google.android.gms:play-services:+' //remove others instead of

In Your AndroidManifest.xml add this lines android:name

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    android:name="android.support.multidex.MultiDexApplication"
    >

And In your build.gradle also add

dexOptions {
    //incremental = true;
    preDexLibraries = false
    javaMaxHeapSize "4g"
}