2014-10-17 71 views
0

爲什麼phonegap build(在線版本)不包含cdv-plugin-fb-connect.js和facebook-js -sdk.js,因爲我們沒有在js inclussion和config.xml文件中做任何修改。嘗試使用老版本的phonegap(3.0.0),這會生成.ipa的這些文件,但不能用於apk。謝謝。Phonegap Build不包括cdv-plugin-fb-connect.js和facebook-js-sdk.js

<?xml version="1.0" encoding="UTF-8" ?> 
<widget xmlns = "http://www.w3.org/ns/widgets" 
     xmlns:gap = "http://phonegap.com/ns/1.0" 
     id   = "com.phonegap.example" 
     versionCode = "10" 
     version  = "1.0.0" > 

    <!-- versionCode is optional and Android only --> 

    <name>sssssssss</name> 

    <description> 
     dasdasdasdasdasa 
    </description> 

    <!-- FB Connect Section --> 
    <gap:plugin name="com.phonegap.plugins.facebookconnect"> 
     <param name="APP_ID" value="XXXXXXXXXXXXX" /> <!-- FB App ID--> 
     <param name="APP_NAME" value="sssss" /> <!-- FB App Namespace--> 
    </gap:plugin> 

    <author href="https://ssssssss.com" email="[email protected]"> 
     ssssssssssssss 
    </author> 

    <!-- Customize your app and platform with the preference element. --> 
    <gap:plugin name="org.apache.cordova.battery-status" /> 
    <gap:plugin name="org.apache.cordova.camera" /> 
    <gap:plugin name="org.apache.cordova.media-capture" /> 
    <gap:plugin name="org.apache.cordova.console" /> 
    <gap:plugin name="org.apache.cordova.contacts" /> 
    <gap:plugin name="org.apache.cordova.device" /> 
    <gap:plugin name="org.apache.cordova.device-motion" /> 
    <gap:plugin name="org.apache.cordova.device-orientation" /> 
    <gap:plugin name="org.apache.cordova.dialogs" /> 
    <gap:plugin name="org.apache.cordova.file" /> 
    <gap:plugin name="org.apache.cordova.file-transfer" /> 
    <gap:plugin name="org.apache.cordova.geolocation" /> 
    <gap:plugin name="org.apache.cordova.globalization" /> 
    <gap:plugin name="org.apache.cordova.inappbrowser" /> 
    <gap:plugin name="org.apache.cordova.media" /> 
    <gap:plugin name="org.apache.cordova.network-information" /> 
    <gap:plugin name="org.apache.cordova.splashscreen" /> 
    <gap:plugin name="org.apache.cordova.vibration" /> 

    <gap:plugin name="com.phonegap.plugins.pushplugin"/> 


    <!-- Core Plugin --> 

    <preference name="target-device"    value="universal" />  <!-- all: possible values handset, tablet, or universal --> 
    <preference name="fullscreen"     value="false" />   <!-- all: hides the status bar at the top of the screen --> 
    <preference name="webviewbounce"    value="true" />   <!-- ios: control whether the screen 'bounces' when scrolled beyond the top --> 
    <preference name="prerendered-icon"   value="true" />   <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen --> 
    <preference name="stay-in-webview"   value="false" />   <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in --> 
    <preference name="ios-statusbarstyle"   value="lightcontent" /> <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar --> 
    <preference name="detect-data-types"   value="true" />   <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system --> 
    <preference name="exit-on-suspend"   value="false" />   <!-- ios: if set to true, app will terminate when home button is pressed --> 
    <preference name="show-splash-screen-spinner" value="true" />   <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading --> 
    <preference name="auto-hide-splash-screen" value="true" />   <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API --> 
    <preference name="disable-cursor"    value="false" />   <!-- blackberry: prevents a mouse-icon/cursor from being displayed on the app --> 
    <preference name="android-minSdkVersion"  value="7" />    <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. --> 
    <preference name="android-installLocation" value="auto" /> 

    <access origin="*" /> 

    <icon src="icon.png" /> 
    <content src="index.html" /> 

    <preference name="orientation" value="portrait" /> 

</widget> 

在我的index.html

<!-- cordova --> 
     <script src="cordova.js"></script> 
     <!-- cordova facebook plugin --> 
     <script src="cdv-plugin-fb-connect.js"></script> 
     <!-- facebook js sdk --> 
     <script src="facebook-js-sdk.js"></script> 
+0

試着問這對PhoneGap的構建支持論壇:http://community.phonegap.com/nitobi – 2014-10-17 20:37:46

+0

我沒有,但我沒有解答,謝謝 – 2014-10-17 20:48:53

回答

2

指示插件(0.4.0)構建雲計算模式的版本包括再次腳本,不包括(Facebook的JS-SDK和CDV -plugin-FB-CONNECT)

<gap:plugin name="com.phonegap.plugins.facebookconnect" version="0.4.0">