ionic-team / capacitor-background-runner

Other
38 stars 21 forks source link

incorrect path to android-js-engine-release.aar #94

Open razvidos opened 3 months ago

razvidos commented 3 months ago
  "dependencies": {
    "@capacitor/android": "5.7.4",
    "@capacitor/app": "5.0.7",
    "@capacitor/background-runner": "1.1.0",
    "@capacitor/core": "5.7.4",
    "@capacitor/geolocation": "^5.0.7",
    "@capacitor/haptics": "5.0.7",
    "@capacitor/ios": "5.7.4",
    "@capacitor/keyboard": "5.0.8",
    "@capacitor/push-notifications": "^5.1.1",
    "@capacitor/share": "^5.0.7",
    "@capacitor/status-bar": "5.0.7",
    "@ionic/storage": "^4.0.0",
    "@ionic/vue": "^7.0.0",
    "@ionic/vue-router": "^7.0.0",
    "axios": "^1.6.8",
    "ionicons": "^7.0.0",
    "pinia": "^2.1.7",
    "vue": "^3.3.0",
    "vue-i18n": "^9.10.2",
    "vue-router": "^4.2.0"
  },
  "devDependencies": {
    "@capacitor/cli": "5.7.4",
    "@types/node": "^20.12.2",
    "@types/node-telegram-bot-api": "^0.64.6",
    "@vitejs/plugin-legacy": "^5.0.0",
    "@vitejs/plugin-vue": "^4.0.0",
    "@vue/eslint-config-typescript": "^12.0.0",
    "@vue/test-utils": "^2.3.0",
    "cypress": "^13.5.0",
    "eslint": "^8.35.0",
    "eslint-plugin-vue": "^9.9.0",
    "jsdom": "^22.1.0",
    "terser": "^5.4.0",
    "typescript": "^5.1.6",
    "vite": "^5.0.0",
    "vitest": "^0.34.6",
    "vue-tsc": "^1.0.24"
  },

FAILURE: Build completed with 9 failures.

1: Task failed with an exception.

image

It was solved with

mkdir android/capacitor-cordova-android-plugins/src/main/libs
copy node_modules/@capacitor/background-runner/android/src/main/libs/android-js-engine-release.aar android/capacitor-cordova-android-plugins/src/main/libs/android-js-engine-release.aar 

npm script for windows:

"scripts": {
"background-lib-fix": "powershell -Command \"if (-Not (Test-Path -Path 'android\\capacitor-cordova-android-plugins\\src\\main\\libs')) { New-Item -ItemType Directory -Path 'android\\capacitor-cordova-android-plugins\\src\\main\\libs' } ; Copy-Item -Path 'node_modules\\@capacitor\\background-runner\\android\\src\\main\\libs\\android-js-engine-release.aar' -Destination 'android\\capacitor-cordova-android-plugins\\src\\main\\libs\\android-js-engine-release.aar'\""
}
razvidos commented 3 months ago

I have not script for copying android-js-engine-release.aar image

image

PratikBodawala commented 1 month ago

it is working for me, version:1.1.0 Could you try without background-lib-fix script?