2015-01-06 27 views
0

我正在写一个代码在Android上调用Parse.com的云代码的几个函数。这是这样的:Parse.com ErrorCode:141功能没有找到

ParseCloud.callFunctionInBackground("appConfig", new HashMap<String, Object>(), new FunctionCallback<HashMap<String, Object>>() { 
      @Override 
      public void done(HashMap<String, Object> result, com.parse.ParseException e) { 
       if (e == null) { 
        HashMap<String, Object> bizConfig = (HashMap)result.get("bizConfig"); 

        if (bizConfig == null) { 
         Log.e("missing data","no bizConfig"); 
         return; 
        } 
        List services = (List)bizConfig.get("services"); 
        homeFragment.updateServices(services); 
       } else { 
        Log.d("error: ", e.toString()); 
       } 
      } 
     }); 

,并在云代码方面:

main.js

require('cloud/app.js'); 
require('cloud/validation.js'); // all beforeSaves 
require('cloud/afterSave.js'); // all afterSaves 
require('cloud/feature.js'); // all cloud code defines 

feature.js

Parse.Cloud.define("appConfig", function(request, response) { 
    response.success({ 
    bizConfig:bizConfig 
    }); 
}); 

因为main.js已要求功能.js具有'appConfig'功能,它应该工作正常,而且它已经。但在我更新了一些与上述代码无关的新代码之后,在android端,我一直得到这个错误:Error:141 function not found。我对此没有任何线索,并且对其进行了搜索,但是我没有得到任何与我目前遇到的问题有关的答案。

有没有人可以回答我的错误?

谢谢,提前。

回答

0

回答我自己的问题。

我只是将feature.js中的所有代码放到main.js中,然后Parse.com最终从feature.js中识别出这些函数。我甚至将它们移回到feature.js中,但这些函数在Parse.com上仍然存在。

我想这只是Parse.com的错误。不知道那里到底发生了什么问题,但是我解决了这个问题。

对于那些可能与我有类似问题的人。