Merhaba Admob reklam eklemek istiyorum ama birtürlü açılmıyor. kodlar aşağıda yardımcı olun lütfen. Haftalardır bununla uğraşıyorum.

manifest.xml ayarları:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.xxxxxxxx"> <uses-permission android:name="android.permission.ACCESS_NETWORK_ST ATE" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:icon="@drawable/klogo" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <meta-data android:name="com.google.android.gms.ads.APPLICATI ON_ID" android:value="ca-app-pub-xxxxxxxxxxx~yyyyyyyyy" /> <activity android:name=".GununSorusu" android:screenOrientation="landscape" /> <activity android:name=".YarismaActivity" android:screenOrientation="landscape" /> <activity android:name=".TebriklerActivity" android:screenOrientation="landscape" /> <activity android:name=".AnamenuActivity" android:screenOrientation="landscape" /> <activity android:name=".MainActivity" android:screenOrientation="landscape"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
gradle (Proje):

// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.0.1' classpath 'com.google.gms:google-services:4.3.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
Gradle(app):

apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 30 buildToolsVersion "29.0.3" defaultConfig { applicationId "com.xxxxxxxxxx" minSdkVersion 16 targetSdkVersion 30 multiDexEnabled true versionCode 4 versionName "2.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'com.google.firebase:firebase-database:19.3.1' implementation 'com.google.firebase:firebase-ads:19.3.0' implementation 'com.google.android.gmslay-services-ads:19.3.0' implementation 'com.google.firebase:firebase-analytics:17.5.0' implementation 'com.google.firebase:firebase-firestore:21.5.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' }

java kodları:

public class AnamenuActivity extends AppCompatActivity { MediaPlayer mediaPlayer; int kategori = 1; private InterstitialAd mInterstitialAd; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_anamenu); MobileAds.initialize(this, new OnInitializationCompleteListener() { @Override public void onInitializationComplete(InitializationStatus initializationStatus) { } }); mInterstitialAd = new InterstitialAd(this); mInterstitialAd.setAdUnitId("ca-app-pub-6415661016738887/3519960570"); mInterstitialAd.loadAd(new AdRequest.Builder().build()); mInterstitialAd.show();
Bu kodları ekledim ama birtürlü tamsayfa reklam sayfası açılmıyor.