gpt4 book ai didi

android - 无法将此添加到gradle中>>>编译 'com.google.android.gms:play-services:6.+'

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

尝试将admob添加到应用中。开始新项目并从以下方向开始指示:

https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start

添加了>编译'com.google.android.gms:play-services:6. +'<到gradle并进行了同步,现在我无法运行,并且出现此错误:

Information:Gradle tasks [:app:assembleDebug]
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportSupportV42100Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices6587Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest
C:\Users\Emmi\Desktop\Android2015\adsplease\app\src\main\AndroidManifest.xml:0:0 Error:
uses-sdk:minSdkVersion 7 cannot be smaller than version 9 declared in library C:\Users\Emmi\Desktop\Android2015\adsplease\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\6.5.87\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms" to force usage
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 7 cannot be smaller than version 9 declared in library C:\Users\Emmi\Desktop\Android2015\adsplease\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\6.5.87\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms" to force usage

最佳答案

如果要与SDK的google_play_service>= 8一起使用< 9,则必须在 list 中使用以下属性:

<uses-sdk 
tools:overrideLibrary="com.google.android.gms.all,com.google.android.gms.ads,com.google.android.gms,
com.google.android.gms.analytics,com.google.android.gms.appindexing,
com.google.android.gms.appinvite,com.google.android.gms.appstate,com.google.android.gms.cast,com.google.android.gms.drive,
com.google.android.gms.fitness,com.google.android.gms.location,com.google.android.gms.maps,com.google.android.gms.games,
com.google.android.gms.gcm,com.google.android.gms.identity,com.google.android.gms.nearby,com.google.android.gms.panorama,
com.google.android.gms.plus,com.google.android.gms.safetynet,com.google.android.gms.wallet,com.google.android.gms.wearable"
/>

这解决了我的问题。

关于android - 无法将此添加到gradle中>>>编译 'com.google.android.gms:play-services:6.+',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28346283/

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