掲題の件で、androidアプリにおいて、
テスト用ID(ca-app-pub-3940256099942544/6300978111)でバナー表示出来ますが、
自分のIDに置き換えると表示されません。
コードとログを貼ります
どうか、ご教授ください。
Java
1Act_top.javaです 2 3 @Override 4 protected void onCreate(Bundle savedInstanceState) { 5 super.onCreate(savedInstanceState); 6 Log.d("TAG", new Throwable().getStackTrace()[0].getMethodName() + " @ " + Act_top.class.getSimpleName()); 7 progressDialog = new ProgressDialog(this); 8 progressDialog.setTitle("ロード中"); 9 progressDialog.setMessage("少々お待ち下さい"); 10 progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); 11 progressDialog.show(); 12 thread = new Thread(this); 13 thread.start(); 14 try { 15 thread.join(); 16 } catch (InterruptedException e1) { 17 e1.printStackTrace(); 18 } 19 20 MobileAds.initialize(this, "ca-app-pub-私の~APPID"); 21 AdView adView = new AdView(this); 22 adView = findViewById(R.id.adView); 23 AdRequest adRequest = new AdRequest.Builder().build(); 24 adView.loadAd(adRequest); 25 }
XML
1layout_top.xmlです 2 3 4<?xml version="1.0" encoding="utf-8"?> 5<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 6 android:id="@+id/fl2" 7 android:layout_width="match_parent" 8 android:layout_height="match_parent" 9 android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"> 10 11 <!--タイトル画面--> 12 <com.google.android.gms.ads.AdView 13 xmlns:ads="http://schemas.android.com/apk/res-auto" 14 android:id="@+id/adView" 15 android:layout_width="wrap_content" 16 android:layout_height="wrap_content" 17 android:layout_centerHorizontal="true" 18 android:layout_alignParentBottom="true" 19 ads:adSize="BANNER" 20 ads:adUnitId= "ca-app-pub-私の/ユニットID"> 21 22 <!-上記IDをテストIDに置き換えるとテスト広告が表示される---> 23 24 </com.google.android.gms.ads.AdView> 25以下省略
logcatです 05-04 16:08:20.666 26116-26143/? E/WVMExtractor: Failed to open libwvm.so: dlopen failed: library "libwvm.so" not found 05-04 16:08:21.008 26116-26168/? E/MPlugin: Unsupported class: com.mediatek.common.telephony.IOnlyOwnerSimSupport 05-04 16:08:21.410 26116-26227/略.私のアプリ名です E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)
app.gradleです dependencies { implementation 'com.android.support:support-v4:26.1.0' implementation 'com.google.android.gms:play-services-ads:15.0.0' testImplementation 'junit:junit:4.12' }
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。