ionic-team / ionic-team/capacitor-background-runner
incorrect path to android-js-engine-release.aar
- Dominant language
- C
- Stars
- 56
- Forks
- 36
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 7
Description
```json
"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.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find :android-js-engine-release:.
Searched in the following locations:
- file:/C:/Users/Ingvar/AndroidStudioProjects/geo-sharing-is/android/capacitor-cordova-android-plugins/src/main/libs/android-js-engine-release.aar
- file:/C:/Users/Ingvar/AndroidStudioProjects/geo-sharing-is/android/app/libs/android-js-engine-release.aar
Required by:
project :app > project :capacitor-background-runner
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

It was solved with
```shell
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:
```json
"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'\""
}
```
Contributor guide
Assessment
This issue has not been assessed yet.