当前位置: 首页 > 知识库问答 >
问题:

Logcat:找不到Google Play服务资源。检查项目配置以确保包含了资源

江宏放
2023-03-14
apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 25
        ...
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
        compile 'com.google.firebase:firebase-core:10.2.0'

    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    ...
    testCompile 'junit:junit:4.12'
    compile 'com.google.android.gms:play-services-games:10.2.0'
    compile 'com.google.android.gms:play-services-plus:10.2.0'

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

共有1个答案

薛修能
2023-03-14

通常情况下,这种情况会发生在模拟器中,因此如果您正确地包含了google play服务,则可以忽略该消息。

 类似资料: