Below I tried to work with the SDK for Facebook, when I encountered this problem, every time you run the code below, I seem to get the error "java.lang.IllegalStateException: activity was destroyed", I think it is somehow connected with fragments, any thoughts?
11-02 15:24:29.212: E/AndroidRuntime(17034): FATAL EXCEPTION: main 11-02 15:24:29.212: E/AndroidRuntime(17034): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.facebooktest/com.example.facebooktest.FacebookTutorial}: java.lang.IllegalStateException: Activity has been destroyed
Above is the error, and below is the code.
package com.example.facebooktest; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.view.Menu; import android.view.ViewGroup.LayoutParams; import android.widget.LinearLayout; import android.widget.TextView; import com.facebook.android.AsyncFacebookRunner; import com.facebook.android.Facebook; public class FacebookTutorial extends FragmentActivity {
source share