2012-09-25 49 views
0

我試圖讓我的插件內的應用程序上下文,但它拋出這個錯誤:的PhoneGap 2.0.0 - getApplicationContext

Can't create handler inside thread that has not called Looper.prepare()

這裏是我的代碼:

ResourceManager manager = ResourceManager.getInstance(this, this.ctx.getApplicationContext()); 

我甚至改變了我的代碼於:

ResourceManager manager = ResourceManager.getInstance(this, this.cordova.getContext()); 

ResourceManager manager = ResourceManager.getInstance(this, this.cordova.getActivity()); 

也試過:

ResourceManager manager = ResourceManager.getInstance(this, cordova.getActivity().getApplicationContext()); 

,但它仍然拋出了同樣的錯誤消息

回答

0

FIXED:這個問題是不相關的越來越ApplicationContext時有一個在ResourceManager中

問題
相關問題