You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cordova platform version (cordova platform ls): android 9.1.0
Plugin configuration options: Not related
Link to your project:
Context
This brought up my attention when build using Ionic Appflow. When doing cordova platform add android, the program detects plugin cordova-plugin-background-geolocation and installs it. However, it installed the original cordova-plugin-background-geolocation plugin not @mauron85/cordova-plugin-background-geolocation even though I only have @mauron85/cordova-plugin-background-geolocation listed in the package.json. Then in the plugins folder, cordova-plugin-background-geolocation is now the incorrect version.
Expected Behavior
The program should not add cordova-plugin-background-geolocation but use @mauron85/cordova-plugin-background-geolocation.
Actual Behavior
Both cordova-plugin-background-geolocation and @mauron85 are installed by npm but ionic plugins folder has cordova-plugin-background-geolocation because due to the ordering index it's added later than @mauron85/cordova-plugin-background-geolocation.
Possible Fix
Not known. But remove @mauron85/cordova-plugin-background-geolocation and cordova-plugin-background-geolocation from package.json before adding android platform, then add it after adding the platform can make it work.
Steps to Reproduce
Clean up project by cordova platform rm android
Remove plugins and node_modules folder
run npm install
run cordova platform add android
run cordova build android then an error msg pops up saying Java Http not found
Context
Unable to build using Appflow.
Debug logs
Task :app:compileDebugJavaWithJavac FAILED
.../platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:6: error: package org.apache.http does not exist
import org.apache.http.HttpResponse;
^
.../platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:7: error: package org.apache.http.client.methods does not exist
import org.apache.http.client.methods.HttpPost;
^
.../platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:8: error: package org.apache.http.entity does not exist
import org.apache.http.entity.StringEntity;
^
.../platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:9: error: package org.apache.http.impl.client does not exist
import org.apache.http.impl.client.DefaultHttpClient;
^
.../platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:662: error: cannot find symbol
DefaultHttpClient httpClient = new DefaultHttpClient();
^
symbol: class DefaultHttpClient
location: class LocationUpdateService
The text was updated successfully, but these errors were encountered:
Your Environment
cordova -v
): 10.0.0cordova platform ls
): android 9.1.0Context
This brought up my attention when build using Ionic Appflow. When doing cordova platform add android, the program detects plugin cordova-plugin-background-geolocation and installs it. However, it installed the original cordova-plugin-background-geolocation plugin not @mauron85/cordova-plugin-background-geolocation even though I only have @mauron85/cordova-plugin-background-geolocation listed in the package.json. Then in the plugins folder, cordova-plugin-background-geolocation is now the incorrect version.
Expected Behavior
The program should not add cordova-plugin-background-geolocation but use @mauron85/cordova-plugin-background-geolocation.
Actual Behavior
Both cordova-plugin-background-geolocation and @mauron85 are installed by npm but ionic plugins folder has cordova-plugin-background-geolocation because due to the ordering index it's added later than @mauron85/cordova-plugin-background-geolocation.
Possible Fix
Not known. But remove @mauron85/cordova-plugin-background-geolocation and cordova-plugin-background-geolocation from package.json before adding android platform, then add it after adding the platform can make it work.
Steps to Reproduce
cordova platform rm android
npm install
cordova platform add android
cordova build android
then an error msg pops up saying Java Http not foundContext
Unable to build using Appflow.
Debug logs
The text was updated successfully, but these errors were encountered: