Flutter应用程序将AdColony与中介集成在一起

编程入门 行业动态 更新时间:2024-10-08 08:33:53
本文介绍了Flutter应用程序将AdColony与中介集成在一起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

设置带有Flutter的AdMob中介(firebase_admob:^ 0.9.3 + 2)时出现以下错误

When setting up AdMob Mediation With Flutter ( firebase_admob: ^0.9.3+2) I'm getting the following error

注意:我已经成功设置了ADmob集成

Note: I have successfully set up the ADmob integration

我遵循这里提到的所有步骤: 将AdColony与中介集成

I follow all the steps mentioned here : Integrating AdColony with Mediation

按照步骤3,这是我的app/build.gradle文件

as per step 3, this is my app/build.gradle file

dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' implementation 'com.google.ads.mediation:adcolony:4.1.4.1' }

错误

FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. > In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[17.0. 0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown. Dependency failing: com.google.android.gms:play-services-measurement-api:17.0.0 -> com.google.android.gms:play-services- measurement-sdk-api@[17.0.0], but play-services-measurement-sdk-api version was 17.1.0. The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends on project 'firebase_admob' which depends onto com.google.firebase:firebase-ads@18.1.1 -- Project 'app' depends onto com.google.firebase:firebase-analytics@{strictly 17.0.0} -- Project 'app' depends onto com.google.android.gms:play-services-ads@{strictly 19.0.1} -- Project 'app' depends on project 'firebase_analytics' which depends onto com.google.firebase:firebase-analytics@16.5. 0 -- Project 'app' depends onto com.google.ads.mediation:adcolony@4.1.4.1 -- Project 'app' depends onto com.google.android.gms:play-services-gass@{strictly 19.0.1} -- Project 'app' depends onto com.google.android.gms:play-services-measurement-sdk-api@{strictly 17.1.0} -- Project 'app' depends onto com.google.firebase:firebase-ads@{strictly 18.1.1} -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@{strictly 17.0.0} -- Project 'app' depends onto com.google.android.gms:play-services-measurement-sdk@{strictly 17.0.0} -- Project 'app' depends onto com.google.ads.mediation:adcolony@{strictly 4.1.4.1} -- Project 'app' depends onto com.google.android.gms:play-services-ads-lite@{strictly 19.0.1} For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at github/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at help.gradle BUILD FAILED in 51s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)

找到了这个github问题,将SDK版本从18.1.1升级到19.1.0

推荐答案

我没有降级AdColony中介适配器,而是设法通过手动编辑文件"flutter.pub-cache \ hosted \ pub.dartlang \ firebase_admob-0.9.3 + 2 \ android \ build.gradle",因此它将获得Admob Android SDK的最新版本:

Instead of downgrading the AdColony mediation adapter, I managed to get it working by manually editing the file "flutter.pub-cache\hosted\pub.dartlang\firebase_admob-0.9.3+2\android\build.gradle", so it gets the latest version of the Admob Android SDK:

android { dependencies { api 'com.google.firebase:firebase-ads:19.1.0' } }

我一个月前已将这个版本发布到Play商店,该应用程序的月活跃用户约为100.000,到目前为止还没有问题...

I have published this a month ago to the Play Store, for an app with around 100.000 MAU, and had no issue so far...

更多推荐

Flutter应用程序将AdColony与中介集成在一起

本文发布于:2023-11-23 22:10:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622995.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   中介   Flutter   AdColony

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!