inmobi Windows 8 Store App集成错误

时间:2014-09-13 14:01:37

标签: windows-store-apps inmobi

我正在尝试在我的Windows 8.1商店应用中使用inmobi广告,但我收到了一些错误。我有addublex广告,但错误与此无关。

错误是

  

[NETWORK_ERROR],错误说明:[发生网络错误。]

此错误视频:

http://www.youtube.com/watch?v=NeogkmfMMtE&

我的代码是

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using GoogleAnalytics.Core;
using InMobi.W8.AdSDK;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinklerId=234238

namespace HdTv
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {            
            this.InitializeComponent();
            CreateAd();
        }
        private void CreateAd()
        {
            SDKUtility.LogLevel = LogLevels.IMLogLevelDebug;
            IMAdView AdView = new IMAdView("af1b5fd03e484946a8b354442526dc43", IMAdView.INMOBI_AD_UNIT_320X50);    
            AdView.Height = 50;
            AdView.Width = 320;

错误

HdTv.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\Desperado\Documents\Visual Studio 2013\Projects\Windows\HdTv\HdTv\bin\Debug\AppX\HdTv.exe'. Symbols loaded.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.UI.Xaml.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.InteropServices.WindowsRuntime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.InteropServices.WindowsRuntime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.ApplicationModel.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Diagnostics.Debug\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Diagnostics.Debug.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.Globalization.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Threading.Tasks\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.Tasks.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.UI.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.WindowsRuntime\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.WindowsRuntime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Users\Desperado\Documents\Visual Studio 2013\Projects\Windows\HdTv\HdTv\bin\Debug\AppX\HtmlAgilityPack.DLL'. Cannot find or open the PDB file.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Resources.ResourceManager\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Resources.ResourceManager.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.Foundation.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Collections\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Collections.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Users\Desperado\Documents\Visual Studio 2013\Projects\Windows\HdTv\HdTv\bin\Debug\AppX\AdDuplex.Universal.Controls.Win.XAML.winmd'. Cannot find or open the PDB file.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Users\Desperado\Documents\Visual Studio 2013\Projects\Windows\HdTv\HdTv\bin\Debug\AppX\AdDuplex.Universal.Win.WinRT.winmd'. Cannot find or open the PDB file.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Users\Desperado\Documents\Visual Studio 2013\Projects\Windows\HdTv\HdTv\bin\Debug\AppX\Microsoft.PlayerFramework.DLL'. Cannot find or open the PDB file.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ObjectModel\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.ObjectModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.Media.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.WindowsRuntime.UI.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.WindowsRuntime.UI.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Users\Desperado\Documents\Visual Studio 2013\Projects\Windows\HdTv\HdTv\bin\Debug\AppX\SM.Media.MediaPlayer.Win81.DLL'. Cannot find or open the PDB file.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Users\Desperado\Documents\Visual Studio 2013\Projects\Windows\HdTv\HdTv\bin\Debug\AppX\InMobiW8AdSDK.DLL'. Module was built without symbols.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.Graphics.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Threading\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.Devices.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IO\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.Storage.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.XDocument\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Xml.XDocument.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Linq\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
2014-09-13 16:51:16,892 InMobi SDK 2.0.2 DEBUG UserAgent: [Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; WebView/2.0; rv:11.0) like Gecko]
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Text.Encoding\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Text.Encoding.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Globalization\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Globalization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.System.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.Networking.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Reflection.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Reflection\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Publisher device Id is: 432c48c74039caff9daa93b6feb22373 
uid_map ::{IX:"cEV5Gm93fXJhWUZ7eX1FUHJicl9bY21weUBfdHd3dHN6cHdTaURzd1ldX3J0fwZ5dWdzZQhWCAs=",WID:"BQEKUgEOUwQCBgILW1BTUAlXV1cIAVoHU1NSAQQFBgE="}
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\system32\WinMetadata\Windows.Security.winmd'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.ReaderWriter\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Xml.ReaderWriter.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
2014-09-13 16:51:16,992 InMobi SDK 2.0.2 DEBUG Sending Ad Request [u-id-map=Oq9PqBfSvoJmITUoB7bHXqVXY3MBBz9TDaGAWX5vtTNWOAiFYpwZv9eKT4aAyfHb%2BApH03dhyjoBDdZ%2BvOtYlnJ7mZkm45OwNhWkmXHt2eDpeoPOxwgk29ojQP%2B%2BFeKAuq6lA9jypRyla7w9VHnTzuX5Z%2FrUIy16dYk6HCagHqPAmeoCSzZZkqmKdeZiH1xG1kmNLLcM9Jn0BKamwlbFVw%2Btl78n1aEASvEe5lUpiWMewzPiTzxrrKlcM%2B9nkagg&u-id-key=1281560366&u-key-ver=1&aid=AwA%2BZAMAWowIALpfBQDijQUALvoGAAEABABeYwEAhogCAI6JCQBW0g%3D%3D&d-device-screen-size=1366%2A768&d-localization=tr&d-orientation=3&u-appver=1%3A1%3A0%3A0&u-appdnm=HdTvWindows&u-appbid=45256blablabla.HdTvWindows&d-nettype=wi-fi&mk-siteid=af1b5fd03e484946a8b354442526dc43&mk-version=pr-SWPH-CTATC-20140116&mk-rel-version=pr-SWPH-CTATC-20140116&format=xhtml&mk-ads=1&h-user-agent=Mozilla%2F5.0%20%28Windows%20NT%206.3%3B%20WOW64%3B%20Trident%2F7.0%3B%20.NET4.0E%3B%20.NET4.0C%3B%20.NET%20CLR%203.5.30729%3B%20.NET%20CLR%202.0.50727%3B%20.NET%20CLR%203.0.30729%3B%20WebView%2F2.0%3B%20rv%3A11.0%29%20like%20Gecko&mk-ad-slot=15&u-rt=1]
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Net.Primitives\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
2014-09-13 16:51:17,123 InMobi SDK 2.0.2 DEBUG Ad container loaded
2014-09-13 16:51:17,125 InMobi SDK 2.0.2 DEBUG Webview added to ad container
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.Json\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'HdTv.exe' (CLR v4.0.30319: Immersive Application Domain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Internals\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Internals.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
2014-09-13 16:51:17,897 InMobi SDK 2.0.2 ERROR ErrorCode: NETWORK_ERROR, Error Desc: Network error occured.
2014-09-13 16:51:17,899 InMobi SDK 2.0.2 ERROR Error occured while processing. Error code: [NETWORK_ERROR], Error description: [Network error occured.]
2014-09-13 16:51:17,902 InMobi SDK 2.0.2 DEBUG Sent Ad Request
Ad Request failed Error Code:NETWORK_ERROR Error Description Network error occured.
The thread 0x1dcc has exited with code 259 (0x103).
The thread 0x1de4 has exited with code 259 (0x103).
The thread 0x17c0 has exited with code 259 (0x103).
The thread 0x1d90 has exited with code 259 (0x103).
The thread 0x18a0 has exited with code 259 (0x103).
The thread 0x1f80 has exited with code 259 (0x103).
The thread 0x1a58 has exited with code 259 (0x103).
The thread 0xf00 has exited with code 259 (0x103).
The thread 0x12b0 has exited with code 259 (0x103).
The thread 0x1db8 has exited with code 259 (0x103).
The program '[7184] HdTv.exe: Program Trace' has exited with code 0 (0x0).
The program '[7184] HdTv.exe' has exited with code 0 (0x0).

            //Subscribe for IMAdView events
            AdView.OnAdRequestFailed += AdView_AdRequestFailed;
            AdView.OnAdRequestLoaded += AdView_AdRequestLoaded;
            AdView.OnDismissAdScreen += AdView_DismissFullAdScreen;
            AdView.OnLeaveApplication += AdView_LeaveApplication;
            AdView.OnShowAdScreen += AdView_ShowFullAdScreen;

            //Set the Applcation Id            
            AdView.RefreshInterval = 20;
            AdView.AnimationType = IMAdAnimationType.SLIDE_IN_LEFT;
            IMAdRequest imAdRequest = new IMAdRequest();



            //Add the ImAdView to page
            container.Children.Add(AdView);
            AdView.LoadNewAd(imAdRequest);


        }

        void AdView_AdRequestLoaded(object sender, EventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("Ad Loaded");

        }

        void AdView_AdRequestFailed(object sender, IMAdViewErrorEventArgs e)
        {
            System.Diagnostics.Debug.WriteLine(string.Format("Ad Request failed Error Code:{0} Error Description {1}",
               e.ErrorCode, e.ErrorDescription));
        }

        void AdView_ShowFullAdScreen(object sender, EventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("Displaying full screen");
        }

        void AdView_LeaveApplication(object sender, EventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("Moving out of application");
        }

        void AdView_DismissFullAdScreen(object sender, EventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("Full screen closed");
        }

1 个答案:

答案 0 :(得分:1)

请注意,inMobi广告仅在平板电脑上展示,而不在PC上展示。

您很可能正在PC上进行测试,并且您收到NETWORK错误。

请阅读: http://social.msdn.microsoft.com/Forums/silverlight/en-US/d079a152-5e85-4144-b07a-f9aa2f4c1ba5/has-anyone-used-inmobi-ads-service-in-hisher-app?forum=toolsforwinapps

  

“我可以在Windows 8笔记本电脑和台式机上获得广告吗?

     

不,InMobi仅在运行Windows RT且不支持Windows 8 Pro的平板电脑上投放广告。“

     

“如果我在Windows 8 Pro上集成InMobi Windows RT SDK会怎样?

     

SDK不会抛出任何异常,但不会投放广告,并且   广告请求将因网络错误而失败。“