2015-01-06 26 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的錯誤。不知道那裏到底發生了什麼問題,但是我解決了這個問題。

對於那些可能與我有類似問題的人。