0

I'm adding ads to my flutter app there are no errors when I restart the app put it shows me this and there are no ads show in the app : enter image description here

when I run the app in the terminal It shows me this error enter image description here

here is my pubspec.yaml

dependencies:
    flutter:
      sdk: flutter

   
     firebase_core: ^0.4.0+9
     firebase_analytics: ^5.0.2
     firebase_auth: ^0.14.0+5
     cloud_firestore: ^0.12.9+5
     cupertino_icons: ^1.0.0
     firebase_admob: ^0.7.0

my build.gradle app level

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation platform('com.google.firebase:firebase-bom:26.7.0')
implementation 'com.google.firebase:firebase-analytics'
implementation "com.google.android.gms:play-services-ads:19.5.0"
implementation "com.google.android.gms:play-services-basement:17.5.0"
implementation 'com.google.firebase:firebase-ads:18.0.0'

}

I also upgrade the app for the second time and there are no ads.

if anyone can help to solve this problem and thanks.

  • What classpath for android are you using? i.e `classpath com.android.tools.build:gradle:4.3.5'` ? Checkout this post and let me know if it was helpful please: https://stackoverflow.com/questions/62969917/how-to-fix-unexpected-element-queries-found-in-manifest-error/65857921 – Huthaifa Muayyad Mar 26 '21 at 22:13
  • my classpath is : classpath 'com.android.tools.build:gradle:3.4.2' . I change it once like they say in GitHub but keeps show the same problem. –  Mar 26 '21 at 22:17
  • That's a pretty old one, what happens if you use ` classpath 'com.android.tools.build:gradle:4.1.0'` ? Your dependencies are also outdated, any reason you don't want to migrate to newer ones? – Huthaifa Muayyad Mar 26 '21 at 22:19
  • I'm surprised too when I read the post you send me because I just migrate my app yesterday but now it sends me this error when i migrate it again : Exception in thread "main" java.lang.RuntimeException: Could not load wrapper properties from 'C:\Users\Hp Z620\QuizMe\android\gradle\wrapper\gradle-wrapper.properties'. –  Mar 26 '21 at 22:25
  • What exactly is it that you migrated? `firebase_auth: ^0.14.0+5` was released Aug 30, 2019. `firebase_core: 0.4.0+9` was on Aug 24, 2019, same thing for the rest of your plugins. All of them have much newer releases dating to this week. – Huthaifa Muayyad Mar 26 '21 at 22:34
  • I migrated the whole app in the Command Prompt to androidx and it works fine until I start to add firebase_admob –  Mar 26 '21 at 22:41

0 Answers0