Closed AgustinNG closed 5 years ago
I'm having the same issue, just can't get my company app to build.
Replace the installed cordova-plugin by ionic cordova plugin add @mauron85/cordova-plugin-background-geolocation
and try it again. If you still face errors, open an issue here: https://github.com/mauron85/cordova-plugin-background-geolocation
Can't get this to work at all, no one can apparently.
@Makepool - you probably want to follow issues on the plugin's repo, like this one: https://github.com/mauron85/cordova-plugin-background-geolocation/issues/558
The problem is with the plugin, not with Ionic Native.
The author of the plug-in won't give you any support for this specific platform-related issue, you should install the alpha version which is a workaround branch that the author made for it to work with ionic, follow the ionic documentation and use cordova 8.1.2.
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/
Current behavior: After installing the plug-in to recompile to Android it gives error.
Expected behavior:
Steps to reproduce:
Related code: ionic start localizacion blank ionic cordova plugin add cordova-plugin-mauron85-background-geolocation@alpha npm install @ionic-native/background-geolocation ionic cordova build android
Other information: ....
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below): `> Task :app:compileDebugJavaWithJavac FAILED /Users/agustinnavarro/Documents/Lenguajes/Ionic/Demos/fichador/platforms/android/app/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java:26: error: package junit.framework does not exist import junit.framework.Assert; ^ /Users/agustinnavarro/Documents/Lenguajes/Ionic/Demos/fichador/platforms/android/app/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java:164: error: cannot find symbol Assert.assertNotNull("Context can not be null!", mContext); ^ symbol: variable Assert location: class LocationServiceIntentBuilder Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errorsFAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.
Try: Run with --stacktrace option to get the stack trace. 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
BUILD FAILED in 2s 24 actionable tasks: 3 executed, 21 up-to-date /Users/agustinnavarro/Documents/Lenguajes/Ionic/Demos/fichador/platforms/android/gradlew: Command failed with exit code 1 Error output: /Users/agustinnavarro/Documents/Lenguajes/Ionic/Demos/fichador/platforms/android/app/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java:26: error: package junit.framework does not exist import junit.framework.Assert; ^ /Users/agustinnavarro/Documents/Lenguajes/Ionic/Demos/fichador/platforms/android/app/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java:164: error: cannot find symbol Assert.assertNotNull("Context can not be null!", mContext); ^ symbol: variable Assert location: class LocationServiceIntentBuilder Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.
Try: Run with --stacktrace option to get the stack trace. 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
BUILD FAILED in 2s [ERROR] An error occurred while running subprocess cordova.