java Android使用Mashape获取验证错误
有没有人尝试过mashape api,并得到这样的错误
Caused by: java.lang.VerifyError: com/mashape/relocation/conn/ssl/AbstractVerifier
at com.mashape.relocation.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:126)
at com.mashape.relocation.impl.conn.PoolingHttpClientConnectionManager.getDefaultRegistry(PoolingHttpClientConnectionManager.java:98)
at com.mashape.relocation.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:105)
at com.mashape.unirest.http.options.Options.refresh(Options.java:72)
at com.mashape.unirest.http.options.Options.<clinit>(Options.java:46)
at com.mashape.unirest.http.HttpClientHelper.prepareRequest(HttpClientHelper.java:151)
at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:131)
at com.mashape.unirest.request.BaseRequest.asString(BaseRequest.java:56)
at app.entersky.hiptunesmusicchart.screen.SongDetail$getSongDetail.doInBackground(SongDetail.java:68)
at app.entersky.hiptunesmusicchart.screen.SongDetail$getSongDetail.doInBackground(SongDetail.java:62)
at 安卓.os.AsyncTask$2.call(AsyncTask.java:288)
这是我的密码
private class callAPI extends AsyncTask<String, Integer, HttpResponse<String>> {
protected HttpResponse<String> doInBackground(String... msg) {
HttpResponse<String> request = null;
try {
request = Unirest.get(<URI>)
.header("X-Mashape-Authorization", <KEY>)
.header("Accept", "text/plain")
.asString();
} catch (UnirestException e) {
e.printStackTrace();
}
return request;
}
protected void onProgressUpdate(Integer...integers) {
}
protected void onPostExecute(HttpResponse<JsonNode> response) {
String answer = response.getBody().toString();
}
}
我试图找到解决办法,但什么也找不到
有人知道怎么解决这个问题吗
谢谢
共 (0) 个答案