我已经尽一切努力让 phonegap facebook 插件在 android 上运行,但无济于事。我正在使用科尔多瓦 3.0。我已按照以下说明操作:https ://github.com/Raffaello/phonegap-facebook-plugin/blob/master/README.md
因此 AndroidManifest.xml 中的应用程序标签如下所示:
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:hardwareAccelerated="true"
android:debuggable="true">
<activity android:name="face_login" android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.LoginActivity"
android:label="@string/app_name" />
</application>
config.xml 文件的底部如下所示:
<plugins>
<plugin name="org.apache.cordova.facebook.Connect" value="org.apache.cordova.facebook.ConnectPlugin" />
</plugins>
</widget>
但是,我得到了大量的错误,例如:
CallbackContext cannot be resolved to a type ConnectPlugin.java
cordova cannot be resolved ConnectPlugin.java
error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android' AndroidManifest.xml
PluginResult cannot be resolved to a type ConnectPlugin.java
The import org.apache.cordova.api cannot be resolved ConnectPlugin.java
webView cannot be resolved or is not a field ConnectPlugin.java
我在构建路径中包含了 cordova-3.0.0.jar。但仍然得到所有这些错误。有任何想法吗?