내 응용 프로그램을 게시했습니다. 일식을 업데이트 한 후 작동하지 않는 이유는 무엇입니까? 이 내 로그 캣입니다 : 01-18 21:48:02.508: E/AndroidRuntime(494): FATAL EXCEPTION: main 01-18 21:48:02.508: E/AndroidRuntime(494): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.beandroid.androchef/com.beandroid.csipordenone.MainActivity}: java.lang.IllegalStateException: The ad size and ad unit ID must be set before loadAd is called. 01-18 21:48:02.508: E/AndroidRuntime(494): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647) 01-18 21:48:02.508: E/AndroidRuntime(494): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 01-18 21:48:02.508: E/AndroidRuntime(494): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 01-18 21:48:02.508: E/AndroidRuntime(494): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 01-18 21:48:02.508: E/AndroidRuntime(494): at android.os.Handler.dispatchMessage(Handler.java:99) 01-18 21:48:02.508: E/AndroidRuntime(494): at android.os.Looper.loop(Looper.java:123) 01-18 21:48:02.508: E/AndroidRuntime(494): at android.app.ActivityThread.main(ActivityThread.java:3683) 01-18 21:48:02.508: E/AndroidRuntime(494): at java.lang.reflect.Method.invokeNative(Native Method) 01-18 21:48:02.508: E/AndroidRuntime(494): at java.lang.reflect.Method.invoke(Method.java:507) 01-18 21:48:02.508: E/AndroidRuntime(494): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 01-18 21:48:02.508: E/AndroidRuntime(494): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 01-18 21:48:02.508: E/AndroidRuntime(494): at dalvik.system.NativeStart.main(Native Method) 01-18 21:48:02.508: E/AndroidRuntime(494): Caused by: java.lang.IllegalStateException: The ad size and ad unit ID must be set before loadAd is called. 01-18 21:48:02.508: E/AndroidRuntime(494): at com.google.android.gms.internal.bh.bn(Unknown Source) 01-18 21:48:02.508: E/AndroidRuntime(494): at com.google.android.gms.internal.bh.a(Unknown Source) 01-18 21:48:02.508: E/AndroidRuntime(494): at com.google.android.gms.ads.AdView.loadAd(Unknown Source) 01-18 21:48:02.508: E/AndroidRuntime(494): at com.beandroid.csipordenone.MainActivity.onCreate(MainActivity.java:102)
이 내 Main.java입니다 : enter code here
loadAd를 호출하기 전에 광고 크기 및 광고 단위 ID를 설정해야합니다. 응용 프로그램이 깨졌습니다.
1
A
답변
1
당신은 아마 설정하는 것을 잊었다 : 당신의 AdView가에
ads:adSize="BANNER"
ads:adUnitId="@string/ad_unit_id"
.
문제가 어디에 있습니까 ???? – Ormet
코드 게시하기 – issathink