1

ubuntu で ionic(1.7.15) を使用しています。

カレンダープラグインを実装しようとするまで、私のプロジェクトは正常に動作します。このプラグインをプロジェクトにインストールした後、コマンドでビルドしようとしましたionic build androidが、次のエラーが発生しました。

ここに画像の説明を入力

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

私のプロジェクトに複数のプラグインがあるために上記のエラーが発生することを願っています。このエラーはmultidexfrom hereに関連していることがわかりました。

私が試したこと:

Android SDK のアップグレードを試みました。

このスタック オーバーフローの質問を使用すると、構成 ':_armv7DebugCompile' のすべての依存関係を解決できませんでした。その後、上記のエラーが発生します。

ここに私のpackage.jsonファイルがあります

{
  "name": "app",
  "version": "1.1.1",
  "description": "app: An Ionic project",
  "dependencies": {
    "gulp": "^3.5.6",
    "gulp-sass": "^2.0.4",
    "gulp-concat": "^2.2.0",
    "gulp-minify-css": "^0.3.0",
    "gulp-rename": "^1.2.0"
  },
  "devDependencies": {
    "bower": "^1.3.3",
    "gulp-util": "^2.2.14",
    "shelljs": "^0.3.0"
  },
  "cordovaPlugins": [
    "cordova-plugin-device",
    "cordova-plugin-console",
    "cordova-plugin-whitelist",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "ionic-plugin-keyboard",
    {
      "locator": "https://github.com/rossmartin/PushPlugin.git",
      "id": "com.phonegap.plugins.PushPlugin"
    }
  ],
  "cordovaPlatforms": [
    "android"
  ]
}

これが私のfetch.jsonファイルです

{
    "cordova-plugin-device": {
        "source": {
            "type": "registry",
            "id": "cordova-plugin-device@~1.1.1"
        },
        "is_top_level": true,
        "variables": {}
    },
    "cordova-plugin-console": {
        "source": {
            "type": "registry",
            "id": "cordova-plugin-console@~1.0.2"
        },
        "is_top_level": true,
        "variables": {}
    },
    "cordova-plugin-whitelist": {
        "source": {
            "type": "registry",
            "id": "cordova-plugin-whitelist"
        },
        "is_top_level": true,
        "variables": {}
    },
    "cordova-plugin-splashscreen": {
        "source": {
            "type": "registry",
            "id": "cordova-plugin-splashscreen"
        },
        "is_top_level": true,
        "variables": {}
    },
    "cordova-plugin-statusbar": {
        "source": {
            "type": "registry",
            "id": "cordova-plugin-statusbar@~2.1.0"
        },
        "is_top_level": true,
        "variables": {}
    },
    "ionic-plugin-keyboard": {
        "source": {
            "type": "registry",
            "id": "ionic-plugin-keyboard"
        },
        "is_top_level": true,
        "variables": {}
    },
    "cordova-plugin-camera": {
        "source": {
            "type": "registry",
            "id": "cordova-plugin-camera"
        },
        "is_top_level": true,
        "variables": {}
    },
    "phonegap-plugin-push": {
        "source": {
            "type": "registry",
            "id": "phonegap-plugin-push"
        },
        "is_top_level": true,
        "variables": {}
    },
    "com.phonegap.plugins.PushPlugin": {
        "source": {
            "type": "git",
            "url": "https://github.com/phonegap-build/PushPlugin.git",
            "subdir": "."
        },
        "is_top_level": true,
        "variables": {}
    },
    "cordova-plugin-datepicker": {
        "source": {
            "type": "git",
            "url": "https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git",
            "subdir": "."
        },
        "is_top_level": true,
        "variables": {}
    },
    "cordova-plugin-calendar": {
        "source": {
            "type": "registry",
            "id": "cordova-plugin-calendar"
        },
        "is_top_level": true,
        "variables": {}
    },
    "cordova-plugin-crosswalk-webview": {
        "source": {
            "type": "registry",
            "id": "cordova-plugin-crosswalk-webview"
        },
        "is_top_level": true,
        "variables": {}
    }
}

何がうまくいかなかったのかわかりません。誰か助けてください。

4

2 に答える 2