question

Carlos avatar image
Carlos asked

Can't load an ad because the view size cannot be determined

I have integrated the adview as described, but it doesn´t work 07-29 13:00:43.373 14813-14813/de.android.contacts D/AmazonMobileAds Configuration: Setting country configuration to United States. 07-29 13:00:43.373 14813-14813/de.android.contacts D/AmazonMobileAds Configuration: Country code set to us 07-29 13:00:43.373 14813-14813/de.android.contacts D/AmazonMobileAds Configuration: Setting configuration endpoints to North America. 07-29 13:00:43.373 14813-14813/de.android.contacts D/AmazonMobileAds Configuration: Region set to na 07-29 13:00:44.083 2236-4051/system_process I/ActivityManager: Start proc com.android.settings for broadcast com.android.settings/.cyanogenmod.superuser.PackageChangeReceiver: pid=14863 uid=1000 gids={41000, 1015, 1028, 3002, 3001, 3003, 3007} 07-29 13:00:44.138 14813-14813/de.android.contacts D/AmazonMobileAds AdLayout: Ad size to be determined automatically. 07-29 13:01:02.683 2236-2247/system_process D/dalvikvm: GC_EXPLICIT freed 896K, 24% free 17832K/23360K, paused 6ms+8ms, total 137ms 07-29 13:01:04.153 14813-14876/de.android.contacts E/AmazonMobileAds AdLayout: Can't load an ad because the view size cannot be determined. 07-29 13:01:04.178 14813-14876/de.android.contacts D/AmazonMobileAds AdController: adFailed 07-29 13:01:04.178 14813-14813/de.android.contacts D/AmazonMobileAds AdController: Default ad listener called - Ad Failed to Load. Error code: REQUEST_ERROR, Error Message: Can't load an ad because the view size cannot be determined. The adview is inside of two other views, which both have width on match_parent. I replaced the admob, which worked fine. No changes to my layout and everything is implemented as in guide. The other point is, that I´m located in Germany, but it is showing US as location. Please help me Message was edited by: Carlos
mobile ads
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Carlos, Thank you for posting. Are you using the latest Amazon Ads SDK (version 5.1.10)? With the latest sdk you should not face this problem according to the layout xml you have. Can you try to run the SimpleAdSample comes with the latest sdk? It seems that ads sdk can not determine the ad size to display. Have you tried specifying adSize in the layout like below? More info link : https://developer.amazon.com/sdk/mobileads/understanding-api.html#Manual%20Ad%20Size
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Carlos avatar image
Carlos answered
Hello, I´m using the latest SDK, just downloaded it yesterday. The SimpleAd App is working for me, but I needet to change the path in the manifest from .SimpleAdActivity to com.amazon.sample.simplead.SimpleAdActivity due to ClassNotFoundException (nothing to do with my problem but anyway^^) I retried today and now the Error log looks a bit differen: 07-30 12:50:40.342 9020-9020/de.android.contacts D/AmazonMobileAds AdLayout: Ad size to be determined automatically. 07-30 12:50:40.402 9020-9020/de.android.contacts D/AmazonMobileAds AdLayout: Ad size to be determined automatically. com.facebook.camera.gating.CameraGatekeeperSetProvider 07-30 12:50:40.797 9020-9057/de.android.contacts D/AmazonMobileAds AdRequest: Generated AAX url: http://aax-us-east.amazon-adsystem.com/x/msdk?appId=04df1480a4b24a28aa08fc61be7d24fd&sz=auto&slot=portrait&ua=Mozilla%2F5.0%20%28Linux%3B%20U%3B%20Android%204.2.2%3B%20de-de%3B%20GT-I9100%20Build%2FJDQ39E%29%20AppleWebKit%2F534.30%20%28KHTML%2C%20like%20Gecko%29%20Version%2F4.0%20Mobile%20Safari%2F534.30%20CyanogenMod%2F10.1%2Fi9100&adsdk=amznAdSDK-android-5.1.10&dinfo=%7B%22scalingFactor%22%3A%221.5%22%2C%22screenSize%22%3A%22480x800%22%2C%22orientation%22%3A%22portrait%22%2C%22os%22%3A%22Android%22%2C%22model%22%3A%22GT-I9100%22%2C%22osVersion%22%3A%224.2.2%22%2C%22connectionType%22%3A%2215%22%2C%22carrier%22%3A%22Telekom.de%22%2C%22language%22%3A%22de%22%2C%22make%22%3A%22samsung%22%2C%22country%22%3A%22DE%22%7D&pkg=%7B%22v%22%3A%2222%22%2C%22lbl%22%3A%22Contacts%20Cleaner%22%2C%22vn%22%3A%221.21%22%2C%22pn%22%3A%22de.android.contacts%22%7D&isTest=true&ad-id=A1_jHV0J20CKvxvNaGdb5rk&sha1_udid=04932881dcdee8e3e5794b1eb1b0884dd70fed4b&mxsz=480x0 07-30 12:50:41.467 9020-9057/de.android.contacts W/AmazonMobileAds AdLoader: Server Message: DISABLED_APP. Try again in 30 seconds; code: 400 07-30 12:50:41.467 9020-9020/de.android.contacts D/webviewglue: nativeDestroy view: 0x513fdbf8 07-30 12:50:41.467 9020-9020/de.android.contacts D/AmazonMobileAds AdController: adFailed 07-30 12:50:41.467 9020-9020/de.android.contacts D/AmazonMobileAds AdController: Default ad listener called - Ad Failed to Load. Error code: NO_FILL, Error Message: Server Message: DISABLED_APP. Try again in 30 seconds 07-30 12:51:00.347 9020-9041/de.android.contacts E/AmazonMobileAds AdLayout: Can't load an ad because the view size cannot be determined. 07-30 12:51:00.347 9020-9041/de.android.contacts D/AmazonMobileAds AdController: adFailed 07-30 12:51:00.347 9020-9020/de.android.contacts D/AmazonMobileAds AdController: Default ad listener called - Ad Failed to Load. Error code: REQUEST_ERROR, Error Message: Can't load an ad because the view size cannot be determined. Do I have to activate it somehow first?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Carlos, Can you please raise a contact us ( https://developer.amazon.com/help/contactus.html) with the app details? Please mention this thread url ( https://forums.developer.amazon.com/forums/thread.jspa?threadID=1268&tstart=0) to the ContactUs case you are going to raise. Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

zarsus avatar image
zarsus answered
Hi, I am having a very similar issue, can you help look at it: 02-11 11:48:33.774: D/AmazonMobileAds AdLayout(10350): Ad size to be determined automatically. 02-11 11:48:33.779: D/AbsListView(10350): onVisibilityChanged() is called, visibility : 4 02-11 11:48:33.779: D/AbsListView(10350): unregisterIRListener() is called 02-11 11:48:33.799: D/AbsListView(10350): onVisibilityChanged() is called, visibility : 0 02-11 11:48:33.799: D/AbsListView(10350): unregisterIRListener() is called 02-11 11:48:34.099: D/AmazonMobileAds AdRequest WebRequest(10350): URL: http://aax-us-east.amazon-adsystem.com/x/msdk?appId= &dinfo=%7B%22scalingFactor%22%3A%222.0%22%2C%22screenSize%22%3A%22720x1280%22%2C%22orientation%22%3A%22portrait%22%2C%22os%22%3A%22Android%22%2C%22model%22%3A%22GT-I9305%22%2C%22osVersion%22%3A%224.3%22%2C%22connectionType%22%3A%22Wifi%22%2C%22carrier%22%3A%22Chunghwa%20Telecom%22%2C%22language%22%3A%22en%22%2C%22make%22%3A%22samsung%22%2C%22country%22%3A%22US%22%7D&pkg=%7B%22v%22%3A%2215%22%2C%22lbl%22%3A%22Baby%20Monitor%22%2C%22vn%22%3A%220.5%22%2C%22pn%22%3A%22com.astrotek.babymonitor%22%7D&ua=Mozilla%2F5.0%20%28Linux%3B%20U%3B%20Android%204.3%3B%20en-us%3B%20GT-I9305%20Build%2FJSS15J%29%20AppleWebKit%2F534.30%20%28KHTML%2C%20like%20Gecko%29%20Version%2F4.0%20Mobile%20Safari%2F534.30&ad-id=A6Ndy818A0Pko7-rm16G81E&isTest=true&adsdk=amznAdSDK-android-5.1.153&slot=portrait&sz=auto&mxsz=720x0&sha1_udid=262c355fe50b5d6934081c9bce568ac7fed963cb 02-11 11:48:34.629: I/dalvikvm(10350): Jit: resizing JitTable from 4096 to 8192 02-11 11:48:34.834: W/AmazonMobileAds AdLoader(10350): Server Message: DISABLED_APP. Try again in 30 seconds; code: 400 02-11 11:48:34.834: D/AmazonMobileAds AdController(10350): adFailed 02-11 11:48:34.834: W/MainActivity(10350): Ad failed to load. Code: NO_FILL, Message: Server Message: DISABLED_APP. Try again in 30 seconds A few info that may be relevant: 1. The SDK is the most recent one 2. Most of the code are the same as example project (FloatingAdActivity.java) 3. If I change app key to the same as example project ("sample-app-v1_pub-2") it works 4. The app is registered but not yet published 5. I am not based in US
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.