Java Azure移动应用程序获取方法android冻结应用程序
我有azure移动应用程序的良好背景,但不在android方面 同时也是完整的java初学者 今天,我正在尝试,azure移动应用程序在本地运行 它有一个表控制器,具有简单的todotable和1列“名称” 这是我的密码Java Azure移动应用程序获取方法android冻结应用程序,java,android,azure,azure-mobile-services,Java,Android,Azure,Azure Mobile Services,我有azure移动应用程序的良好背景,但不在android方面 同时也是完整的java初学者 今天,我正在尝试,azure移动应用程序在本地运行 它有一个表控制器,具有简单的todotable和1列“名称” 这是我的密码 public class TodoItem { private String Id; private String Name; } private void CreateMobileAppClient() { String mobileAppUrl="ht
public class TodoItem {
private String Id;
private String Name;
}
private void CreateMobileAppClient() {
String mobileAppUrl="http://localhost:58441/";
try {
mobileServiceClient = new MobileServiceClient(new URL(mobileAppUrl), this);
} catch(IOException e){
throw new RuntimeException(e);
}
}
private void GetData() {
MobileServiceTable<TodoItem> mTable=mobileServiceClient.getTable(TodoItem.class);
try {
List<TodoItem> results = mTable.execute().get(100, TimeUnit.MILLISECONDS);
Log.d("debug","data success");
String str="";
} catch(Exception e) {
}
}
公共类待办事项{
私有字符串Id;
私有字符串名称;
}
私有void CreateMobileAppClient(){
字符串MOBILEAPURL=”http://localhost:58441/";
试一试{
mobileServiceClient=新的mobileServiceClient(新的URL(MobileAppur),this);
}捕获(IOE异常){
抛出新的运行时异常(e);
}
}
私有void GetData(){
MobileServiceTable mTable=mobileServiceClient.getTable(TodoItem.class);
试一试{
List results=mTable.execute().get(100,TimeUnit.ms);
Log.d(“调试”、“数据成功”);
字符串str=“”;
}捕获(例外e){
}
}
在调试期间,一切都正常,直到我使用execute().get()
方法
在这一点上,我的应用程序完全冻结,既不进入捕获块,也不进入下一行
我在日志和消息中也看不到太多
我认为这个问题与这个问题类似
任何帮助都是有用的
(注意:azure端的table controller与fiddler完美配合,因此没有问题。)尝试使用:
MobileServiceList<TodoItem> results = mTable.execute().get(100, TimeUnit.MILLISECONDS);
尝试使用:
MobileServiceList<TodoItem> results = mTable.execute().get(100, TimeUnit.MILLISECONDS);
如果在GetAll方法中将log语句添加到后端,您会得到什么?如果在GetAll方法中将log语句添加到后端,您会得到什么?