迁移到 ADF Mobile 11.1.2.4 后,RestServiceAdapter 库无法连接到 URL,也无法加载调用 URL 的页面。
RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();
restServiceAdapter.clearRequestProperties();
restServiceAdapter.setConnectionName("twitter");
restServiceAdapter.setRequestType(RestServiceAdapter.REQUEST_TYPE_GET);
restServiceAdapter.setRetryLimit(0);
restServiceAdapter.setRequestURI("/search.json?q=OC_WIRE");
String response = "";
try {
response = restServiceAdapter.send("");
} catch (Exception e) {
System.out.println("Error...");
}
此代码在 ADF Mobile 11.1.2.3 中运行良好。感谢您的回复