在降级Google Play服务后调整依赖关系 [英] Adapting dependencies after downgrading Google Play Services
问题描述
我应该编译而不是:
compile'com.google.android.gms:play-services:9.0。 2'
build.gradle(模块: app)当我
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'
我正在尝试使用以下build.gradle进行清理:
apply plugin:'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion23.0.3
defaultConfig {
applicationIdcom.noureddine_ouertani.www.wocelli50
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName1.0
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
dexOptions {
//增量= true;
preDexLibraries = false
javaMaxHeapSize4g
}
}
依赖关系{
编译fileTree(包括:['* .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'
//编译'com.google.android.gms:play-services:9.0.2'
//编译'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'
//编译'com.android.support:multidex:1.0.0'
编译'com.android.support:multidex:1.0.1'
编译'com.google.android.gms:play-services:+'//删除其他人而不是
}
编译作品。不过,当我转到我的路线跟踪活动时,我的应用要求我更新Google Play服务。我也看不到地图了。
I升级后的Google Play服务降级并登陆此处。
解决方案试试我的答案,通过此代码更新代码
首次编译
$ b
编译'com.android.support:multidex:1.0.1'
编译'com.google.android.gms:play-services:+'//删除其他人而不是
AndroidManifest.xml 添加以下内容 android:name
< application
android:allowBackup =true
android:icon =@ mipmap / ic_launcher
android:l abel =@ string / app_name
android:supportsRtl =true
android:theme =@ style / AppTheme
android:name =android.support.multidex.MultiDexApplication
>
并在 build.gradle 中添加
dexOptions {
// incremental = true;
preDexLibraries = false
javaMaxHeapSize4g
}
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
inbuild.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.)
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.
I updated Google Play Services after downgrading them and landed here.
解决方案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" }
这篇关于在降级Google Play服务后调整依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!