我遵循了这条指令: http://docs.aws.amazon.com/mobile/sdkforunity/developerguide/sns.html 但是当我在Unity上播放示例场景时,出现了这个错误:
XmlException: expected '>' (3E) but found '<' (3C) Line 3, position 6.
Mono.Xml2.XmlTextReader.Expect (Int32 expected)
Mono.Xml2.XmlTextReader.ReadStartTag ()
Mono.Xml2.XmlTextReader.ReadContent ()
Mono.Xml2.XmlTextReader.Read ()
System.Xml.XmlTextReader.Read ()
Mono.Xml.XmlFilterReader.Read ()
Mono.Xml.XmlFilterReader.Read ()
System.Xml.Linq.XDocument.ReadContent (System.Xml.XmlReader reader, LoadOptions options)
System.Xml.Linq.XDocument.LoadCore (System.Xml.XmlReader reader, LoadOptions options)
System.Xml.Linq.XDocument.Load (System.IO.TextReader reader, LoadOptions options)
System.Xml.Linq.XDocument.Load (System.IO.TextReader reader)
Amazon.AWSConfigs+<>c__DisplayClass89_0.<LoadConfigFromResource>b__0 ()
Amazon.AWSConfigs.LoadConfigFromResource ()
Amazon.AWSConfigs.GetSection[AWSSection] (System.String sectionName)
Amazon.Util.Internal.RootConfig..ctor ()
Amazon.AWSConfigs..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Amazon.AWSConfigs
Amazon.Runtime.Internal.Util.Logger.ConfigureLoggers ()
Amazon.Runtime.Internal.Util.Logger..ctor (System.Type type)
Amazon.Runtime.Internal.Util.Logger.GetLogger (System.Type type)
Amazon.Util.Internal.AmazonHookedPlatformInfo..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Amazon.Util.Internal.AmazonHookedPlatformInfo
Amazon.UnityInitializer.Awake ()
UnityEngine.GameObject:AddComponent()
Amazon.UnityInitializer:AttachToGameObject(GameObject)
AWSSDK.Examples.SNSExample:Start() (at Assets/Examples/SNSExample.cs:66)
我也在设备上进行了测试,但它根本无法工作(在SNS控制台上找不到任何应用程序端点)。我见过许多人在论坛,博客等方面与我有同样的错误,但似乎没有人找到解决方案。
请帮我解决这个问题,或者向我展示如何在Unity上使用Amazon Simple Notification Service的示例(有效)。
非常感谢!
答案 0 :(得分:0)
您可以在Unity上使用Amazon Simple Notification Service找到示例: https://github.com/awslabs/aws-sdk-unity-samples/tree/master/SNS