gpt4 book ai didi

android - 我该如何解决?建议: use tools:overrideLibrary =“com.google.android.gms.play_services” to force usage

转载 作者:行者123 更新时间:2023-12-03 09:04:15 25 4
gpt4 key购买 nike

,这是我的第一个应用程序,我将重新设计皮肤,然后得到此Eror!在图像中,这里enter image description here :我进行了研究,并尝试添加“com.google.android.gms.play_services”,就像本指南中的Here一样,但代码错误仍然是Hopping Bird Game。 gradle文件

apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "25.0.2"

defaultConfig {
applicationId "bb.hoppingbird"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:19.1.0'
compile 'com.google.android.gms:play-services:+'
}


请帮忙!

最佳答案

这是Google开发人员正式发行说明中的​​报价-

Google Play services 10.2.x is the first release that no longer includes full support for Android version 2.3.x (Gingerbread). Apps developed using SDK release 10.2.x and later require a minimum Android API level of 14 and cannot be installed on devices running an API level below 14. To learn more about your options, including building multiple APKs to extend your app's support for Android Gingerbread,



现在有两个选择-
  • 将目标API级别14作为最低支持的API级别。
  • 构建多个APK以支持API级别小于14的设备。
    这是您可以做到的-
    为您使用的Play服务组件定义两种不同的产品风格,以及两种不同的编译依赖关系:
    productFlavors {
    legacy {
    minSdkVersion 9
    versionCode 901 // Min API level 9, v01
    }
    current {
    minSdkVersion 14
    versionCode 1401 // Min API level 14, v01
    }
    }
    dependencies {
    legacyCompile 'com.google.android.gms:play-services:10.0.0'
    currentCompile 'com.google.android.gms:play-services:10.2.0'
    }

  • 来源- Google developer blog

    关于android - 我该如何解决?建议: use tools:overrideLibrary =“com.google.android.gms.play_services” to force usage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42732486/

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