2011-06-16 50 views
1

我得到這個問題,而eshtablishing facebook android sdk連接.. 當im運行代碼我得到的logcat的此錯誤消息:WARN/InputManagerService(59):窗口已經聚焦,忽略焦點增益:[email protected]

WARN/InputManagerService(59): Window already focused, ignoring focus gain of: [email protected] 

這是我的代碼已經refrenced Facebook的Android SDK中我的項目:

package com.conn; 

import android.app.Activity; 
import android.content.Intent; 
import android.os.Bundle; 
import com.facebook.android.*; 
import com.facebook.android.Facebook.*; 

public class MyGreatActivity extends Activity { 

Facebook facebook = new Facebook("YOUR_APP_ID"); 

/** Called when the activity is first created. */ 
@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.main); 

    facebook.authorize(this, new String[] { "email", "read_stream" }, 
new DialogListener() { 
     @Override 
     public void onComplete(Bundle values) {} 

     @Override 
     public void onFacebookError(FacebookError error) {} 

     @Override 
     public void onError(DialogError e) {} 

     @Override 
     public void onCancel() {} 
    }); 
} 

@Override 
public void onActivityResult(int requestCode, int resultCode, Intent data) { 
    super.onActivityResult(requestCode, resultCode, data); 

    facebook.authorizeCallback(requestCode, resultCode, data); 
} 


} 

請幫

+0

礦山固定方式:Intent.FLAG_ACTIVITY_CLEAR_TOP – 2016-03-12 00:31:45

回答

1

有時,此警告無法正確顯示在日誌中,您可以忽略它(另請參閱this bugreport)。

但是,如果你有問題,你的代碼不能正常工作,你應該檢查this postthis post的解決方案

+0

請儘量幫我在上面的代碼... .try編輯上面一個 – sunny 2011-06-21 06:04:47

+0

我有facebook android sdk引用到我的項目 – sunny 2011-06-21 06:05:31

相關問題