简体   繁体   English

生成phonegap应用程序插件错误

[英]Building phonegap app plugin error

I created a zip package from my app. 我从我的应用程序创建了一个zip包。

Then, I uploaded it to phonegap build to create the apk file I need. 然后,我将其上传到phonegap构建以创建所需的apk文件。

In the output, I saw this: 在输出中,我看到了:

Fetching plugin "cordova-plugin-geolocation" via npm Installing "cordova-plugin-geolocation" at "4.0.1" for android Plugin doesn't support this project's cordova-android version. 通过npm获取插件“ cordova-plugin-geolocation”在android的“ 4.0.1”安装“ cordova-plugin-geolocation”不支持该项目的cordova-android版本。 cordova-android: 6.2.3, failed version requirement: >=6.3.0 Skipping 'cordova-plugin-geolocation' for android Fetching plugin cordova-android:6.2.3,失败的版本要求:> = 6.3.0为Android Fetching插件跳过“ cordova-plugin-geolocation”

"cordova-plugin-inappbrowser" via npm Installing 通过npm安装“ cordova-plugin-inappbrowser”

"cordova-plugin-inappbrowser" at "2.0.2" for android Fetching plugin 适用于Android Fetching插件的“ cordova-plugin-inappbrowser”位于“ 2.0.2”

"cordova-plugin-splashscreen" via npm Installing 通过npm安装“ cordova-plugin-splashscreen”

"cordova-plugin-splashscreen" at "5.0.2" for android Fetching plugin 适用于Android Fetching插件的“ 5.0.2”中的“ cordova-plugin-splashscreen”

"cordova-plugin-whitelist" via npm Installing 通过npm安装“ cordova-plugin-whitelist”

"cordova-plugin-whitelist" at "1.3.3" for android version, you do not need this plugin since the whitelist will be built in. Fetching plugin "cordova-plugin-ios-longpress-fix" via npm “科尔多瓦-插件白名单”,在“1.3.3”的Android版本,你不需要这个插件,因为白名单将在建在撷取插件“科尔多瓦-插件-IOS-长按修复”通过NPM

Installing "cordova-plugin-ios-longpress-fix" at "1.1.0" for android 在Android的“ 1.1.0”安装“ cordova-plugin-ios-longpress-fix”

Fetching plugin "cordova-plugin-statusbar" via npm Installing 通过npm安装获取插件“ cordova-plugin-statusbar”

"cordova-plugin-statusbar" at "2.4.1" for android Fetching plugin 适用于Android Fetching插件的“ cordova-plugin-statusbar”位于“ 2.4.1”

"phonegap-plugin-push@2.0.0" via npm Installing "phonegap-plugin-push" 通过npm安装“ phonegap-plugin-push@2.0.0”

at "2.0.0" for android Subproject Path: CordovaLib Fetching plugin 在Android子项目的“ 2.0.0”位置:CordovaLib获取插件

"phonegap-plugin-barcodescanner" via npm Installing "phonegap-plugin-barcodescanner" at "7.0.2" for android Plugin doesn't support this project's cordova-android version. 通过npm的“ phonegap-plugin-barcodescanner”在android的“ 7.0.2”安装“ phonegap-plugin-barcodescanner”不支持该项目的cordova-android版本。 cordova-android: 6.2.3, failed version requirement: >=6.3.0 Skipping 'phonegap-plugin-barcodescanner' for android** cordova-android:6.2.3,失败的版本要求:> = 6.3.0跳过android的“ phonegap-plugin-barcodescanner” **

This is my confing.xml: 这是我的confing.xml:

<widget id="com.devexpress.apptemplate" version="1.0" versionCode="1">
  <name>ApplicationTemplate</name>
  <description>Template</description>
  <author email="info@aaa.com" href="http://www.aaa.com/">aaaa</author>
  <preference name="permissions" value="none" />
  <preference name="prerendered-icon" value="true" />
  <preference name="phonegap-version" value="cli-7.0.1" />
  <preference name="android-windowSoftInputMode" value="adjustPan" />
  <preference name="SplashScreenDelay" value="60000" />
  <preference name="AutoHideSplashScreen" value="false" />
  <preference name="SplashShowOnlyFirstTime" value="false" />
  <preference name="FadeSplashScreen" value="false" />
  <preference name="ShowSplashScreenSpinner" value="false" />
  <preference name="DisallowOverscroll" value="true" />
  <preference name="StatusBarOverlaysWebView" value="false" />
  <preference name="StatusBarStyle" value="default" />
  <feature name="StatusBar">
    <param name="ios-package" value="CDVStatusBar" onload="true" />
  </feature>
  <preference name="StatusBarBackgroundColor" value="#000000" />
  <preference name="android-minSdkVersion" value="15" />
  <preference name="android-targetSdkVersion" value="22" />
  <platform name="android">
    <resource-file src="google-services.json" target="google-services.json" />
  </platform>
  <platform name="ios">
    <resource-file src="GoogleService-Info.plist" />
  </platform>
  <plugin name="cordova-plugin-geolocation" />
  <plugin name="cordova-plugin-inappbrowser" />
  <plugin name="cordova-plugin-splashscreen" onload="true" />
  <plugin name="cordova-plugin-whitelist" />
  <plugin name="cordova-plugin-ios-longpress-fix" />
  <plugin name="cordova-plugin-statusbar" onload="true" />
  <plugin name="phonegap-plugin-push" spec="2.0.0" />
  <plugin name="phonegap-plugin-barcodescanner" />
  <access origin="*" />
  <engine name="android" spec="^6.3.0" />

</widget>

I tried to add the last line to specify the android engine, but the output is the same. 我试图添加最后一行以指定android引擎,但是输出是相同的。 I'm using the phonegap version 7.0.1 and I prefer to keep it. 我正在使用phonegap版本7.0.1,并且我希望保留它。 Is there a way to reach my goal, keeping this phonegap version and adding the plugins I need [gps reader and barcode scanner]? 有没有一种方法可以达到我的目标,保持此phonegap版本并添加我需要的插件[gps读取器和条形码扫描器]?

Try with this 试试这个

<plugin name="cordova-plugin-geolocation" spec="2.4.1" />

and for Barcode use this plugin 对于条形码,请使用此插件

<plugin spec="https://github.com/Telerik-Verified-Plugins/BarcodeScanner.git" source="git" >
    <param name="CAMERA_USAGE_DESCRIPTION" value="To scan barcodes." />
    </plugin>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM