简体   繁体   English

将Admob添加到我的项目时遇到问题

[英]I have problem with adding Admob to my project

When I adding this to my build.gradle (Module): 当我将其添加到我的build.gradle(模块):

implementation 'com.google.android.gms:play-services-ads:17.1.1'

This line of code is underlined in red: 这行代码用红色下划线表示:

implementation 'com.android.support:appcompat-v7:27.1.1'

Error description: - All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). 错误描述: -所有com.android.support库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。 Found versions 27.1.1, 26.1.0. 找到版本27.1.1、26.1.0。 Examples include com.android.support:animated-vector-drawable:27.1.1 and com.android.support:customtabs:26.1.0 示例包括com.android.support:animated-vector-drawable:27.1.1和com.android.support:customtabs:26.1.0

I was trying to implement and change customtabs from version 26.1.1 to 27.1.1 in dependiences but it still not working:(( 我试图依靠依赖方式将customtabs从26.1.1版本更改为27.1.1,但仍然无法正常工作:((

I want get any help in this 我想得到任何帮助

I have the same issue - i update api and its fine now. 我有同样的问题-我现在更新api及其它。 please follow this instructions: 请按照以下说明进行操作:

open SDK Manager: 打开SDK Manager: 在此处输入图片说明

Install the latest one: 安装最新的: 在此处输入图片说明

restart your IDE (android studio) open gradle and change to: 重新启动您的IDE(android studio)打开gradle并更改为:

implementation 'com.android.support:appcompat-v7:28.0.0'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM