不同Android版本的HTTP请求错误

时间:2016-01-19 07:54:49

标签: java android

我在我的应用中使用android volley和version 5.0.1库进行联网。首先,我只是使用凌空在android javax.net.ssl.SSLException: SSL handshake aborted: ssl=0x62f65e18: I/O error during system call, Connection reset by peer 中对服务器进行登录调用,并且它工作正常,但是当我在棒棒糖下面的Android版本中使用volley时,它给了我以下错误:

android-async-http:1.4.9

然后我决定使用-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ NSMutableArray *arrdate=[[NSMutableArray alloc]init]; arrdate=[date1 objectAtIndex:section] ; NSLog(@"%@",arrdate); NSMutableArray *arrtime=[[NSMutableArray alloc]init]; arrtime=[time objectAtIndex:section]; NSString *strvalue=[arrdate objectAtIndex:0]; UIView *view; if([strvalue isEqualToString: strcheck]) { view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, 15)]; /* Create custom view to display section header... */ UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(10, 5, tableView.frame.size.width, 15)]; [label1 setFont:[UIFont boldSystemFontOfSize:12]]; strcheck=[arrdate objectAtIndex:0] ; NSString *string =[arrtime objectAtIndex:0]; /* Section header is in 0th index... */ [label1 setText:string]; [view addSubview:label1]; } else{ /* Create custom view to display section header... */ view= [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.frame.size.width, 100)]; //main time UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 5, tableView.frame.size.width, 15)]; [label setFont:[UIFont boldSystemFontOfSize:12]]; strcheck=[arrdate objectAtIndex:0] ; /* Section header is in 0th index... */ [label setText:strcheck]; [view addSubview:label]; //time.. UILabel *labeltime = [[UILabel alloc] initWithFrame:CGRectMake(10,20, tableView.frame.size.width, 15)]; [labeltime setFont:[UIFont boldSystemFontOfSize:12]]; NSString *stringtime =[arrtime objectAtIndex:0]; /* Section header is in 0th index... */ [labeltime setText:stringtime]; [view addSubview:labeltime]; } return view; 库但仍然得到相同的错误。任何人都可以帮助我,因为我的应用程序适用于大于16的版本。

1 个答案:

答案 0 :(得分:0)

我遇到了与android-async-http相同的错误:1.4.9。我切换到android-async-http:1.4.8,一切正常。显然,他们在android-async-http库中改变了一些导致问题的东西 - 由于Google删除了Apache Http客户端(http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html)导致的Http客户端组件。他们的GitHub仓库中存在此错误的问题。

同时 - 我使用版本android-async-http:1.4.8。