亚马逊广告整合不起作用

时间:2016-01-16 06:00:37

标签: android amazon-web-services amazon ads

我是第一次测试亚马逊广告,我正在关注亚马逊快速入门指南它是sdk中提供的示例项目

但我仍然遇到这些错误 - Logcat

01-16 12:37:11.359: E/AmazonMobileAds SISGenerateDIDRequest WebRequest HttpURLConnectionWebRequest(6212): Problem while creating output steam for request body: aax-eu.amazon-adsystem.com/127.0.0.1:80 - Connection refused
01-16 12:37:11.359: E/AmazonMobileAds AdRequest WebRequest HttpURLConnectionWebRequest(6212): Problem while creating output steam for request body: aax-eu.amazon-adsystem.com/127.0.0.1:80 - Connection refused
01-16 12:37:11.359: E/AmazonMobileAds AdLoader(6212): Could not contact Ad Server
01-16 12:37:11.367: W/SimpleAdSample(6212): Ad failed to load. Code: NETWORK_ERROR, Message: Could not contact Ad Server

这是Layout.XML -

<?xml version="1.0" encoding="utf-8"?>    
<LinearLayout 
 xmlns:android="http://schemas.android.com/apk/res/android"
 xmlns:Amazon="http://schemas.android.com/apk/lib/com.amazon.device.ads"     
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:orientation="vertical"
 android:gravity="top|center_horizontal">

 <com.amazon.device.ads.AdLayout
    android:id="@+id/ad_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>

 <LinearLayout
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
     android:gravity="bottom|center">

     <Button
         android:id="@+id/load_ad_button"
         android:layout_width="150dp"
         android:layout_height="50dp"
         android:text="@string/button_text"
         android:textSize="8.5pt">
     </Button>

     <TextView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="30dp"
         android:layout_marginBottom="30dp"
         android:gravity="center"
         android:textSize="6.5pt"
         android:padding="5dp"
         android:text="@string/description">
     </TextView>

 </LinearLayout>    

1 个答案:

答案 0 :(得分:0)