-1
我正在創建一個鍵盤,但在局部變量用法中有一些錯誤。android java代碼錯誤
private void updateCandidateText(){
try{
ExtractedText r= getCurrentInputConnection().getExtractedText(new ExtractedTextRequest(),InputConnection.GET_EXTRACTED_TEXT_MONITOR);
String strbeforeCursor="";
String strafterCursor ="";
strbeforeCursor = getCurrentInputConnection().getTextBeforeCursor(1000000000, 0).toString();
strafterCursor = getCurrentInputConnection().getTextAfterCursor(1000000000, 0).toString();
String str = strbeforeCursor + "|"+strafterCursor;
if(mTamilPreviewView != null)
mTamilPreviewView.update(str, strbeforeCursor.length());
mTamilPreviewView.update(r.text.toString() , 0);
}
catch (Exception e) {
Log.e("t", "errr", e);
}
}
你能告訴我們你得到了什麼錯誤? – 2013-03-01 06:48:58
在本地方法defenition中出錯 – user2122423 2013-03-01 07:16:08
@ user2122423:錯誤附帶**特定**消息。 **閱讀**這條消息可以理解錯誤是什麼,而不是猜測。在此處粘貼**完整**和**精確**錯誤消息。 – 2013-03-01 07:49:48