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());
,但它仍然拋出了同樣的錯誤消息