0

这是我的终端清单:

$ cordova 创建 LogicLinkApp com.endare.logiclinkplugin

Creating a new cordova project.

$ cd LogicLinkApp/

$cordova 平台添加 ios

Using cordova-fetch for cordova-ios@^5.0.0
Adding ios project...
Creating Cordova project for the iOS platform:
    Path: platforms/ios
    Package: com.endare.logiclinkplugin
    Name: HelloCordova
iOS project created with cordova-ios@5.0.1
Plugin 'cordova-plugin-whitelist' found in config.xml... Migrating it to package.json
Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for ios
Adding cordova-plugin-whitelist to package.json

$ plugman create --name LogicLinkPlugin --plugin_id cordova-plugin-logiclinkplugin --plugin_version 0.0.1

$ cd LogicLink插件/

$ plugman 平台添加 --platform_name ios

$ sudo plugman createpackagejson 。

name: (cordova-plugin-logiclinkplugin) 
version: (0.0.1) 
description: 
git repository: 
author: 
license: (ISC) 
About to write to /Users/admin/Dev/LogicLinkApp/LogicLinkPlugin/package.json:

{
  "name": "cordova-plugin-logiclinkplugin",
  "version": "0.0.1",
  "description": "",
  "cordova": {
    "id": "cordova-plugin-logiclinkplugin",
    "platforms": [
      "ios"
    ]
  },
  "keywords": [
    "ecosystem:cordova",
    "cordova-ios"
  ],
  "author": "",
  "license": "ISC"
}


Is this OK? (yes) 

$ plugman install --platform android --project 平台/android --plugin ../LogicLinkPlugin/

ENAMETOOLONG: name too long, stat '/Users/admin/Dev/LogicLinkApp/LogicLinkPlugin/platforms/android/node_modules/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/platforms/android/cordova/plugins/cordova-plugin-logiclinkplugin/package.json'
4

1 回答 1

0

尝试使用短名称和 ID。例如:

cordova-plugin-logiclinkplugin =>logic

我做了:

plugman create --name demop --plugin_id demop --plugin_version 1.0.0

plugman platform add --platform_name android

plugman createpackagejson .

cordova plugin add ../demop

它奏效了:

在此处输入图像描述

于 2020-09-29T17:00:27.647 回答