dsjhejw3232 2015-09-27 01:54
浏览 76
已采纳

Android JSON解析URL

I'm new to StackOverflow and Android altogether. I successfully parsed JSON from a direct URL

http://jsonapptest.x10host.com/index.php

The problem I'm facing is I'm trying to make everything a little more complex by adding PHP's URL ?= function. So, on a normal browser loading up :

http://jsonapptest.x10host.com/index.php?page=

works fine. In my App; it doesn't work at all (blank white screen)

public class MainActivity extends Activity{
// Log tag
private static final String TAG = MainActivity.class.getSimpleName();

// Movies json url
private static final String url = "http://jsonapptest.x10host.com/index.php?page=";
private ProgressDialog pDialog;
private List<Movie> movieList = new ArrayList<Movie>();

Please give me a hand, I'm confused.

  • 写回答

1条回答 默认 最新

  • doukou1718 2015-09-27 03:43
    关注

    The problem was in my index.php file. I had <HTML> and <body> tags. I removed all tags except for my <?php and it loads up fine.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题