Http Url连接获取数据android

时间:2017-01-04 22:39:43

标签: android http android-studio networking google-places

发出错误

let noteServiceType = typedefof<NoteService> let creatorMethod = noteServiceType.GetMethods() |> Seq.filter (fun staticMethod -> staticMethod.Name = "GetCustomBinding_IIntakeNoteManager" && staticMethod.ReturnType = typedefof<NoteService.ServiceTypes.SimpleDataContextTypes.IntakeNoteManagerClient> && staticMethod.GetParameters().Length = 0) |> Seq.toList let creatorMethod = creatorMethod |> Seq.head let client = creatorMethod.Invoke(null, [||]) :?> NoteService.ServiceTypes.SimpleDataContextTypes.IntakeNoteManagerClient

我已实现此代码,但大多数库已弃用,无法找到任何解决方案。

是否有任何更新的代码可以使用google api获取该地点的详细信息。

代码如下:

Error:(57, 16) error: cannot find symbol class HttpResponseException

1 个答案:

答案 0 :(得分:0)

HttpClient在API级别22中已弃用,已在API级别23中删除。如果您仍想使用它,请在您的gradle文件中将其添加到旧版库中

android {
    useLibrary 'org.apache.http.legacy'
}