1
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    Log.v("ANE", "onCreate");

    FacebookSdk.sdkInitialize(getApplicationContext());         
    Log.v("ANE", "init FB");


    //setContentView(Resources.getResourseIdByName("com.yoonsik.facebookane", "layout", "activity_main"));
    setContentView(R.layout.activity_main); 
    Log.v("ANE", "setContentView");

    callbackManager = CallbackManager.Factory.create();

I'm trying to initialize Facebook SDK like this, but it is not working.
Everything was fine in my Eclipse Java project but it never works in my app. I am sure I set up key hashes in the Facebook developer page and the .ane file is fine.

<android>
    <manifestAdditions><![CDATA[
        <manifest android:installLocation="auto">
            <!--See the Adobe AIR documentation for more information about setting Google Android permissions-->
            <!--Removing the permission android.permission.INTERNET will have the side effect
    of preventing you from debugging your application on your device-->
            <uses-permission android:name="android.permission.INTERNET"/>
            <!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>-->
            <!--<uses-permission android:name="android.permission.READ_PHONE_STATE"/>-->
            <!--<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>-->
            <!--The DISABLE_KEYGUARD and WAKE_LOCK permissions should be toggled together
    in order to access AIR's SystemIdleMode APIs-->
            <!--<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>-->
            <!--<uses-permission android:name="android.permission.WAKE_LOCK"/>-->
            <!--<uses-permission android:name="android.permission.CAMERA"/>-->
            <!--<uses-permission android:name="android.permission.RECORD_AUDIO"/>-->
            <!--The ACCESS_NETWORK_STATE and ACCESS_WIFI_STATE permissions should be toggled
    together in order to use AIR's NetworkInfo APIs-->
            <!--<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>-->
            <!--<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>-->

           <application>
                <activity
                    android:name="com.yoonsik.facebookane.MainActivity"
                    android:theme="@android:style/Theme.Translucent">
                    android:label="@string/app_name">                       
                </activity>

                <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

                <activity 
                    android:name="com.facebook.FacebookActivity"
                    android:configChanges= "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
                    android:theme="@android:style/Theme.Translucent.NoTitleBar"
                    android:label="@string/app_name"/>

            </application>
        </manifest>

    ]]></manifestAdditions>
</android>

This is the Android manifest in my app's XML file.
I'm checking the LogCat everytime but it doesn't show "init FB".

06-02 10:59:27.574: V/ANE(16438): Function Put  
06-02 10:59:27.574: V/ANE(16438): 액티비티 생성  
06-02 10:59:27.574: V/ANE(16438): 새 인텐트 생성  
06-02 10:59:28.044: V/ANE(16438): onCreate  

My air app stops with no more logs. How can I fix this?

Daniel
  • 2,355
  • 9
  • 23
  • 30
조윤식
  • 11
  • 3

0 Answers0