无法在air + ane中初始化Facebook SDK

时间:2016-06-02 02:10:19

标签: android facebook air initialization ane

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();

我试图像这样初始化Facebook SDK,但它无法正常工作 我的Eclipse Java项目中的一切都很好,但它在我的应用程序中无法运行。 我确信我在Facebook开发者页面中设置了键哈希,并且.ane文件没问题。

<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>

这是我应用的XML文件中的Android清单 我每次都要检查LogCat,但它没有显示&#34; init FB&#34;。

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  

我的空中应用程序停止,没有更多日志。我该如何解决这个问题?

0 个答案:

没有答案