Adwhirl android 无法解析 JSON
您好,我收到一条错误消息,指出 adwhirl 无法解析 json 响应 我试图将我的广告加载到 AdwhirlLayout 中,如文档中所述,但它只是告诉我它无法解析 json 数据。
02-13 16:00:20.260: D/AdWhirl SDK(13928): Prefs{null}: {"config": "", "timestamp": 1329144790626}
02-13 16:00:20.260: I/AdWhirl SDK(13928): Using stored config data
02-13 16:00:20.260: D/AdWhirl SDK(13928): Received jsonString:
02-13 16:00:20.260: E/AdWhirl SDK(13928): Unable to parse response from JSON. This may or may not be fatal.
02-13 16:00:20.260: E/AdWhirl SDK(13928): org.json.JSONException: End of input at character 0 of
02-13 16:00:20.260: E/AdWhirl SDK(13928): at org.json.JSONTokener.syntaxError(JSONTokener.java:446)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at org.json.JSONTokener.nextValue(JSONTokener.java:93)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at org.json.JSONObject.<init>(JSONObject.java:154)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at org.json.JSONObject.<init>(JSONObject.java:171)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at com.adwhirl.AdWhirlManager.parseConfigurationString(AdWhirlManager.java:290)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at com.adwhirl.AdWhirlManager.fetchConfig(AdWhirlManager.java:257)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at com.adwhirl.AdWhirlLayout$InitRunnable.run(AdWhirlLayout.java:376)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:150)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:264)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.lang.Thread.run(Thread.java:1020)
我的代码:
AdWhirlLayout adWhirlLayout = (AdWhirlLayout) findViewById(R.id.adwhirlLayout);
int diWidth = 320;
int diHeight = 52;
int density = (int) getResources().getDisplayMetrics().density;
adWhirlLayout.setAdWhirlInterface(this);
adWhirlLayout.setMaxWidth((int) (diWidth * density));
adWhirlLayout.setMaxHeight((int) (diHeight * density));
我的密钥在 android 清单中指定
Hi im getting a error saying that adwhirl cannot parse json response
Im trying to load my ad into a AdwhirlLayout as stated in the documentation but it just says to me it cannot parse the json data.
02-13 16:00:20.260: D/AdWhirl SDK(13928): Prefs{null}: {"config": "", "timestamp": 1329144790626}
02-13 16:00:20.260: I/AdWhirl SDK(13928): Using stored config data
02-13 16:00:20.260: D/AdWhirl SDK(13928): Received jsonString:
02-13 16:00:20.260: E/AdWhirl SDK(13928): Unable to parse response from JSON. This may or may not be fatal.
02-13 16:00:20.260: E/AdWhirl SDK(13928): org.json.JSONException: End of input at character 0 of
02-13 16:00:20.260: E/AdWhirl SDK(13928): at org.json.JSONTokener.syntaxError(JSONTokener.java:446)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at org.json.JSONTokener.nextValue(JSONTokener.java:93)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at org.json.JSONObject.<init>(JSONObject.java:154)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at org.json.JSONObject.<init>(JSONObject.java:171)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at com.adwhirl.AdWhirlManager.parseConfigurationString(AdWhirlManager.java:290)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at com.adwhirl.AdWhirlManager.fetchConfig(AdWhirlManager.java:257)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at com.adwhirl.AdWhirlLayout$InitRunnable.run(AdWhirlLayout.java:376)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:150)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:264)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
02-13 16:00:20.260: E/AdWhirl SDK(13928): at java.lang.Thread.run(Thread.java:1020)
my code:
AdWhirlLayout adWhirlLayout = (AdWhirlLayout) findViewById(R.id.adwhirlLayout);
int diWidth = 320;
int diHeight = 52;
int density = (int) getResources().getDisplayMetrics().density;
adWhirlLayout.setAdWhirlInterface(this);
adWhirlLayout.setMaxWidth((int) (diWidth * density));
adWhirlLayout.setMaxHeight((int) (diHeight * density));
my key is specified in android manifest
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 AdWhirl 配置服务器现在已关闭。您可能想在一个小时左右再试一次,希望到那时它已经恢复了。
I think that the AdWhirl config server is down right now. You may want to try it again in an hour or so and hopefully it's back up by that point.