gpt4 book ai didi

java - 降级 Google Play 服务后调整依赖项

转载 作者:行者123 更新时间:2023-12-01 09:45:58 26 4
gpt4 key购买 nike

我应该编译什么而不是:

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'

当我 downgraded Google Play Services from 9.0.83 to 8.1.18 manually 时,在 build.gradle (Module:app) 中的 dependency 中?我的目的是避免此日志错误:

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]]

@呃。 Arjun saini:我收到此错误。 (我的 list 文件已正确配置。)

enter image description here

我现在正在尝试使用以下 build.gradle 进行清理:

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

}

编译作品。但是,当我转到路线跟踪 Activity 时,我的应用程序希望我更新 Google Play 服务。我也看不到 map 了。

enter image description here

我在降级后更新了 Google Play 服务并登陆 here .

最佳答案

通过更新代码尝试我的答案

首先编译构建

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

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

在您的 AndroidManifest.xml 中添加以下行 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"
>

并在您的build.gradle中添加

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

关于java - 降级 Google Play 服务后调整依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38030881/

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