繁体   English   中英

VS2017科尔多瓦。 无法安装Push Plugin,因为需要Cordova vrs 7.1

[英]VS2017 Cordova. Can't install Push Plugin because Cordova vrs 7.1 required

我试图将“推送通知”添加到空白的VS2017 Cordova应用程序中,但似乎Cordova版本6.3.1可能不够。 (警告:插件不支持该项目的cordova版本。cordova:6.3.1,失败的版本要求:> = 7.1.0)

无论如何,是否可以在Visual Studio中对此进行更新? 微软团队可能会放弃科尔多瓦吗? 似乎很怀疑。

Installing plugin 'phonegap-plugin-push'
No scripts found for hook "before_plugin_add".
No version specified for phonegap-plugin-push, retrieving version from config.xml
No version for phonegap-plugin-push saved in config.xml
Attempting to use npm info for phonegap-plugin-push to choose a compatible release
Running command: cmd "/s /c "C:\WSP\App\BlankCordovaApp3\platforms\android\cordova\version.bat""
Command finished with error code 0: cmd /s /c "C:\WSP\App\BlankCordovaApp3\platforms\android\cordova\version.bat"
Warning: Unmet project requirements for latest version of phonegap-plugin-push:
Unmet project requirements for latest version of phonegap-plugin-push:
Warning:     cordova-android (5.2.1 in project, >=7.1.0 required)
    cordova-android (5.2.1 in project, >=7.1.0 required)
Warning:     cordova (6.3.1 in project, >=7.1.0 required)
    cordova (6.3.1 in project, >=7.1.0 required)
Warning: Current project does not satisfy the engine requirements specified by any version of phonegap-plugin-push. Fetching latest version of plugin anyway (may be incompatible)
Current project does not satisfy the engine requirements specified by any version of phonegap-plugin-push. Fetching latest version of plugin anyway (may be incompatible)
Calling plugman.fetch on plugin "phonegap-plugin-push"
Fetching plugin "phonegap-plugin-push" via npm
Copying plugin "C:\Users\randall.tomes\AppData\Roaming\npm-cache\phonegap-plugin-push\2.2.2\package" => "C:\WSP\App\BlankCordovaApp3\plugins\phonegap-plugin-push"
Calling plugman.install on plugin "C:\WSP\App\BlankCordovaApp3\plugins\phonegap-plugin-push" for platform "android
Installing "phonegap-plugin-push" for android
Running command: cmd "/s /c "C:\WSP\App\BlankCordovaApp3\platforms\android\cordova\version.bat""
Command finished with error code 0: cmd /s /c "C:\WSP\App\BlankCordovaApp3\platforms\android\cordova\version.bat"
Warning: Plugin doesn't support this project's cordova version. cordova: 6.3.1, failed version requirement: >=7.1.0
Plugin doesn't support this project's cordova version. cordova: 6.3.1, failed version requirement: >=7.1.0
Warning: Skipping 'phonegap-plugin-push' for android
Skipping 'phonegap-plugin-push' for android
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at C:\WSP\App\BlankCordovaApp3\platforms\android\res\xml\config.xml
Merging project's config.xml into platform-specific android config.xml
Found "merges/android" folder. Copying its contents into the android project.
Merging and updating files from [www, platforms\android\platform_www, merges\android] to platforms\android\assets\www
  copy  platforms\android\platform_www\cordova_plugins.js platforms\android\assets\www\cordova_plugins.js (updated file)
Wrote out android application name "some game" to C:\WSP\App\BlankCordovaApp3\platforms\android\res\values\strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000
Wrote out Android package name "com.testapp.somegame" to C:\WSP\App\BlankCordovaApp3\platforms\android\src\com\testapp\somegame\MainActivity.java
Updating icons at platforms\android\res
Updating splash screens at platforms\android\res
Prepared android project successfully
No scripts found for hook "after_plugin_add".
Done

在这里看一下Taco路线图-支持Cordova 7的Update 11

在我的回答中,我报告了如何将TACO升级到cordova 7.1.0

请按照以下步骤操作:

  • 在您的机器上安装nodejs 4.8.7

  • 在Visual Studio中,转到“工具”>“选项”>““ apache cordova的工具””并标记“ chekbox”“使用NodeJS的沙盒版本”

  • 编辑项目的taco.json文件并设置“ cordova-cli”:“ 7.1.0”

  • 打开一个新的控制台并在您的计算机上安装cordova(npm install -g cordova@7.1.0)

对于android构建:

  • 打开提示符,数字android并按回车键
  • 从工具下载API 26 SDK
  • 下载gradle 2.x并将bin文件夹放入系统路径
  • 安装jdk 1.8.x并将其设置为java_home system var
  • 重启

希望能帮助到你。

暂无
暂无

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

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