Android 尝试播放AWS cloudfront链接时,MediaPlayer返回错误(1,-2147483648)

Android 尝试播放AWS cloudfront链接时,MediaPlayer返回错误(1,-2147483648),android,amazon-web-services,amazon-s3,android-viewpager,android-mediaplayer,Android,Amazon Web Services,Amazon S3,Android Viewpager,Android Mediaplayer,我从数据库中获得的链接与S3存储桶上的视频相关,但每次我尝试播放一个链接时,它都会返回1,-2147483648 public static ExploreFragment create(int pageNumber) { ExploreFragment fragment = new ExploreFragment(); Bundle args = new Bundle(); args.putInt(ARG_PAGE, pageNumber); fragment.

我从数据库中获得的链接与S3存储桶上的视频相关,但每次我尝试播放一个链接时,它都会返回1,-2147483648

public static ExploreFragment create(int pageNumber) {
    ExploreFragment fragment = new ExploreFragment();
    Bundle args = new Bundle();
    args.putInt(ARG_PAGE, pageNumber);
    fragment.setArguments(args);
    return fragment;
}

public ExploreFragment() {
}


@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    // Inflate the layout containing a title and body text.
    ViewGroup rootView = (ViewGroup) inflater
            .inflate(R.layout.fragmentlayout, container, false);
    vv1 = (SurfaceView) rootView.findViewById(R.id.VideoView1); 
    holder = vv1.getHolder();
    holder.addCallback(this);
    mp = new MediaPlayer();
    try {
        mp.setDataSource(links.get(getPageNumber()).trim());
    } catch (IllegalArgumentException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (SecurityException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IllegalStateException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    mp.setOnPreparedListener(this);
    mp.prepareAsync();
    mp.start();
    return rootView;
链接只是一个列表,其中包含我需要在ViewPager上显示的cloudfront中的所有链接

这是提取内容的异步任务:

    class PullContent extends AsyncTask<Void,Void,String> {


     public ArrayList<String> list = new ArrayList<String>();
     public ArrayList<String> linklist = new ArrayList<String>();
     public static ArrayList<ArrayList<String>> listoflists = new      ArrayList<ArrayList<String>>();
     public static String[] array;

     @Override
     protected String doInBackground(Void... params) {
    /*if(Long.parseLong(Constants.EXPIRATION_DATE) < System.currentTimeMillis() +      15*60*100){
        new TokenRequest().execute(Constants.SECRETKEY_LOGIN);
    }*/
    HttpClient httpclient = new DefaultHttpClient();
    HttpResponse response;

    try {
        response = httpclient.execute(new HttpPost("http://davai.co/getkremlin"));

        InputStreamReader SearchReader = null;
        try {
            SearchReader = new InputStreamReader(response.getEntity().getContent());
        } catch (IllegalStateException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        BufferedReader ObjBuffer = new BufferedReader(SearchReader);

        String line = "";
        try {
            while((line = ObjBuffer.readLine())!= null){
                list.add(line.trim());
                if(list.size() == 2){
                    listoflists.add(list);
                    linklist.add(list.toString());
                    list.clear();
                }

            }
            ExploreFragment.checked = true;
            getContent(linklist);
        } catch (IOException e) {
            Log.i("exception", "exception");// TODO Auto-generated catch block
            e.printStackTrace();
        }

    }
    catch(Exception exception){
        Log.i("exception", exception.getMessage());
        return null;
    }
    return null;
}
public void onPostExecute(String result){
}
private void getContent(ArrayList<String> linklist) {
    if(linklist.size()>0){
        // TODO Auto-generated method stub
        for(String str:linklist){
            int indexofOpen = str.indexOf("[");
            int indexofClose = str.lastIndexOf("]");
            String res = str.substring(indexofOpen+1,indexofClose);
            String[] resarray = res.split(",");
            ExploreFragment.usernames.add(resarray[0].trim());
            ExploreFragment.links.add(resarray[2]);
            ExploreFragment.locations.add(resarray[3]);
            ExploreFragment.times.add(resarray[1]);
        }
    }else{
        new AlertDialogFrag();
    }

是否检查links.getPageNumber.trim的值?你能在浏览器中播放吗?是的,这些值在浏览器中播放