Parse.com中未创建新的ParseObject

时间:2015-03-05 12:59:43

标签: android parse-platform

我的App后端作为parse.com,我希望用我自己的字段解析一个新表。我尝试按如下方式创建解析对象:

ParseObject listedProperty = new ParseObject("Properties");
listedProperty.put("Intention", subIntention);
listedProperty.put("Type", subType);
listedProperty.put("City", subCity);
 listedProperty.put("Locality", subLocality);
 listedProperty.put("Address", subAdd);
   listedProperty.saveInBackground(new SaveCallback() {
                    @Override
                    public void done(ParseException e) {
                        if (e == null) {
                            Log.e("Yes","Success");
                        } else {
                            Log.e("No", "Unseccessfull");
                        }
                    }
                });

我已经在应用程序类中初始化了我的键,我的登录流程与ParseUsers一起运行良好。当单击按钮时触发上面的代码时,我看不到在解析时创建的任何数据或表(类)。我怎样才能实现这个?????????

堆栈跟踪:

03-05 14:57:54.193    1539-1564/com.iwillcode.realestate W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-05 14:57:54.193    1539-1564/com.iwillcode.realestate W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa29d43c0, error=EGL_SUCCESS
03-05 14:58:02.191    1539-1564/com.iwillcode.realestate W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-05 14:58:02.191    1539-1564/com.iwillcode.realestate W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa4372fa0, error=EGL_SUCCESS
03-05 14:58:03.557    1539-1564/com.iwillcode.realestate W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-05 14:58:03.557    1539-1564/com.iwillcode.realestate W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2c42760, error=EGL_SUCCESS
03-05 14:58:05.624    1539-1564/com.iwillcode.realestate W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-05 14:58:05.624    1539-1564/com.iwillcode.realestate W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2c05ce0, error=EGL_SUCCESS
03-05 14:58:07.495    1539-1564/com.iwillcode.realestate W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-05 14:58:07.495    1539-1564/com.iwillcode.realestate W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xacfc7120, error=EGL_SUCCESS
03-05 14:58:13.677    1539-1564/com.iwillcode.realestate W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-05 14:58:13.677    1539-1564/com.iwillcode.realestate W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2c42340, error=EGL_SUCCESS
03-05 14:58:18.184    1539-1564/com.iwillcode.realestate W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-05 14:58:18.184    1539-1564/com.iwillcode.realestate W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2c05e20, error=EGL_SUCCESS
03-05 14:58:19.784    1539-1564/com.iwillcode.realestate W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-05 14:58:19.784    1539-1564/com.iwillcode.realestate W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2c42a20, error=EGL_SUCCESS
03-05 14:58:21.299    1539-1564/com.iwillcode.realestate W/EGL_emulation﹕ eglSurfaceAttrib not implemented
03-05 14:58:21.299    1539-1564/com.iwillcode.realestate W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2c47e60, error=EGL_SUCCESS
03-05 14:58:30.897    1539-1539/com.iwillcode.realestate E/No﹕ Unseccessfull

1 个答案:

答案 0 :(得分:0)

您可能没有从仪表板中实际创建“属性”类。如果您有,那么您的问题很可能是由于您使用.put()方法传递的类型。

例如,如果您将“city”列作为String类型并尝试执行

parseObject.put("city", 1);

它不会成功储蓄。因此,请确保所有变量都是预期的类型。还要确保您尝试分配的值都不是null,因为Parse不允许这样做。