Phonegap 3.7.0 手电筒插件不工作
Phonegap 3.7.0 Flashlight Plugin doesn't work
我只是想添加手电筒插件 (https://build.phonegap.com/plugins/294),但它不起作用。我没有错误,它没有显示在 build.phonegap.com.
的插件列表中
我在 config.xml
中添加了这行代码
<gap:plugin name="nl.x-services.plugins.flashlight" version="1.0" />
但是还是不行
这是全部config.xml:
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="com.flashy.ltescari" version="1.0.0">
<version>0.0.1</version>
<description>A flashlight application.</description>
<author href="" email="luca.tescari@hotmail.com">Luca Tescari</author>
<content src="index.html"/>
<preference name="permissions" value="none"/>
<preference name="orientation" value="default"/>
<preference name="target-device" value="universal"/>
<preference name="fullscreen" value="true"/>
<preference name="webviewbounce" value="true"/>
<preference name="prerendered-icon" value="true"/>
<preference name="stay-in-webview" value="false"/>
<preference name="ios-statusbarstyle" value="black-opaque"/>
<preference name="detect-data-types" value="true"/>
<preference name="exit-on-suspend" value="false"/>
<preference name="show-splash-screen-spinner" value="true"/>
<preference name="auto-hide-splash-screen" value="true"/>
<preference name="disable-cursor" value="false"/>
<preference name="android-minSdkVersion" value="7"/>
<preference name="android-installLocation" value="auto"/>
<gap:plugin name="org.apache.cordova.battery-status" version="0.2.11" />
<gap:plugin name="org.apache.cordova.camera" version="0.3.2" />
<gap:plugin name="org.apache.cordova.console" version="0.2.11" />
<gap:plugin name="org.apache.cordova.contacts" version="0.2.13" />
<gap:plugin name="org.apache.cordova.device" version="0.2.12" />
<gap:plugin name="org.apache.cordova.device-motion" version="0.2.10" />
<gap:plugin name="org.apache.cordova.device-orientation" version="0.3.9" />
<gap:plugin name="org.apache.cordova.dialogs" version="0.2.10" />
<gap:plugin name="org.apache.cordova.file" version="1.3.1" />
<gap:plugin name="org.apache.cordova.file-transfer" version="0.4.6" />
<gap:plugin name="org.apache.cordova.geolocation" version="0.3.10" />
<gap:plugin name="org.apache.cordova.globalization" version="0.3.1" />
<gap:plugin name="org.apache.cordova.inappbrowser" version="0.5.2" />
<gap:plugin name="nl.x-services.plugins.flashlight" version="1.0" />
<gap:plugin name="org.apache.cordova.media" version="0.2.13" />
<gap:plugin name="org.apache.cordova.media-capture" version="0.3.3" />
<gap:plugin name="org.apache.cordova.network-information" version="0.2.12" />
<gap:plugin name="org.apache.cordova.splashscreen" version="0.3.4" />
<gap:plugin name="org.apache.cordova.vibration" version="0.3.11" />
<icon src="icon.png"/>
<icon src="www/res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:qualifier="ldpi"/>
<icon src="www/res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:qualifier="mdpi"/>
<icon src="www/res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:qualifier="hdpi"/>
<icon src="www/res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:qualifier="xhdpi"/>
<icon src="www/res/icon/blackberry/icon-80.png" gap:platform="blackberry"/>
<icon src="www/res/icon/blackberry/icon-80.png" gap:platform="blackberry" gap:state="hover"/>
<icon src="www/res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57"/>
<icon src="www/res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72"/>
<icon src="www/res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114"/>
<icon src="www/res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144"/>
<icon src="www/res/icon/webos/icon-64.png" gap:platform="webos"/>
<icon src="www/res/icon/windows-phone/icon-48.png" gap:platform="winphone"/>
<icon src="www/res/icon/windows-phone/icon-173-tile.png" gap:platform="winphone" gap:role="background"/>
<gap:splash src="www/res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:qualifier="port-ldpi"/>
<gap:splash src="www/res/screen/android/screen-mdpi-portrait.png" gap:platform="android" gap:qualifier="port-mdpi"/>
<gap:splash src="www/res/screen/android/screen-hdpi-portrait.png" gap:platform="android" gap:qualifier="port-hdpi"/>
<gap:splash src="www/res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:qualifier="port-xhdpi"/>
<gap:splash src="www/res/screen/blackberry/screen-225.png" gap:platform="blackberry"/>
<gap:splash src="www/res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480"/>
<gap:splash src="www/res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960"/>
<gap:splash src="www/res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136"/>
<gap:splash src="www/res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024"/>
<gap:splash src="www/res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768"/>
<gap:splash src="www/res/screen/windows-phone/screen-portrait.jpg" gap:platform="winphone"/>
<access origin="*"/>
</widget>
使用:
<gap:plugin name="nl.x-services.plugins.flashlight" version="2.0.3" />
因此,我没有在线编译它,而是将其放在 github 上,并将其作为 public 应用程序添加到 build.phongeap 上。终于成功了!我不知道为什么这会有所不同,但它确实有效!
我只是想添加手电筒插件 (https://build.phonegap.com/plugins/294),但它不起作用。我没有错误,它没有显示在 build.phonegap.com.
的插件列表中我在 config.xml
中添加了这行代码<gap:plugin name="nl.x-services.plugins.flashlight" version="1.0" />
但是还是不行
这是全部config.xml:
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="com.flashy.ltescari" version="1.0.0">
<version>0.0.1</version>
<description>A flashlight application.</description>
<author href="" email="luca.tescari@hotmail.com">Luca Tescari</author>
<content src="index.html"/>
<preference name="permissions" value="none"/>
<preference name="orientation" value="default"/>
<preference name="target-device" value="universal"/>
<preference name="fullscreen" value="true"/>
<preference name="webviewbounce" value="true"/>
<preference name="prerendered-icon" value="true"/>
<preference name="stay-in-webview" value="false"/>
<preference name="ios-statusbarstyle" value="black-opaque"/>
<preference name="detect-data-types" value="true"/>
<preference name="exit-on-suspend" value="false"/>
<preference name="show-splash-screen-spinner" value="true"/>
<preference name="auto-hide-splash-screen" value="true"/>
<preference name="disable-cursor" value="false"/>
<preference name="android-minSdkVersion" value="7"/>
<preference name="android-installLocation" value="auto"/>
<gap:plugin name="org.apache.cordova.battery-status" version="0.2.11" />
<gap:plugin name="org.apache.cordova.camera" version="0.3.2" />
<gap:plugin name="org.apache.cordova.console" version="0.2.11" />
<gap:plugin name="org.apache.cordova.contacts" version="0.2.13" />
<gap:plugin name="org.apache.cordova.device" version="0.2.12" />
<gap:plugin name="org.apache.cordova.device-motion" version="0.2.10" />
<gap:plugin name="org.apache.cordova.device-orientation" version="0.3.9" />
<gap:plugin name="org.apache.cordova.dialogs" version="0.2.10" />
<gap:plugin name="org.apache.cordova.file" version="1.3.1" />
<gap:plugin name="org.apache.cordova.file-transfer" version="0.4.6" />
<gap:plugin name="org.apache.cordova.geolocation" version="0.3.10" />
<gap:plugin name="org.apache.cordova.globalization" version="0.3.1" />
<gap:plugin name="org.apache.cordova.inappbrowser" version="0.5.2" />
<gap:plugin name="nl.x-services.plugins.flashlight" version="1.0" />
<gap:plugin name="org.apache.cordova.media" version="0.2.13" />
<gap:plugin name="org.apache.cordova.media-capture" version="0.3.3" />
<gap:plugin name="org.apache.cordova.network-information" version="0.2.12" />
<gap:plugin name="org.apache.cordova.splashscreen" version="0.3.4" />
<gap:plugin name="org.apache.cordova.vibration" version="0.3.11" />
<icon src="icon.png"/>
<icon src="www/res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:qualifier="ldpi"/>
<icon src="www/res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:qualifier="mdpi"/>
<icon src="www/res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:qualifier="hdpi"/>
<icon src="www/res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:qualifier="xhdpi"/>
<icon src="www/res/icon/blackberry/icon-80.png" gap:platform="blackberry"/>
<icon src="www/res/icon/blackberry/icon-80.png" gap:platform="blackberry" gap:state="hover"/>
<icon src="www/res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57"/>
<icon src="www/res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72"/>
<icon src="www/res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114"/>
<icon src="www/res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144"/>
<icon src="www/res/icon/webos/icon-64.png" gap:platform="webos"/>
<icon src="www/res/icon/windows-phone/icon-48.png" gap:platform="winphone"/>
<icon src="www/res/icon/windows-phone/icon-173-tile.png" gap:platform="winphone" gap:role="background"/>
<gap:splash src="www/res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:qualifier="port-ldpi"/>
<gap:splash src="www/res/screen/android/screen-mdpi-portrait.png" gap:platform="android" gap:qualifier="port-mdpi"/>
<gap:splash src="www/res/screen/android/screen-hdpi-portrait.png" gap:platform="android" gap:qualifier="port-hdpi"/>
<gap:splash src="www/res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:qualifier="port-xhdpi"/>
<gap:splash src="www/res/screen/blackberry/screen-225.png" gap:platform="blackberry"/>
<gap:splash src="www/res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480"/>
<gap:splash src="www/res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960"/>
<gap:splash src="www/res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136"/>
<gap:splash src="www/res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024"/>
<gap:splash src="www/res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768"/>
<gap:splash src="www/res/screen/windows-phone/screen-portrait.jpg" gap:platform="winphone"/>
<access origin="*"/>
</widget>
使用:
<gap:plugin name="nl.x-services.plugins.flashlight" version="2.0.3" />
因此,我没有在线编译它,而是将其放在 github 上,并将其作为 public 应用程序添加到 build.phongeap 上。终于成功了!我不知道为什么这会有所不同,但它确实有效!