Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Compile cordova-plugin-mauron85-background-geolocation@alpha #2979

Closed
AgustinNG opened this issue Apr 4, 2019 · 5 comments
Closed

Comments

@AgustinNG
Copy link

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 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • 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'.

Compilation failed; see the compiler error output for details.

  • 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.

    cordova build android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.`
@n0minal
Copy link

n0minal commented Apr 28, 2019

I'm having the same issue, just can't get my company app to build.

@danielsogl
Copy link
Owner

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

@Makepool
Copy link

Can't get this to work at all, no one can apparently.

@kensodemann
Copy link
Contributor

@Makepool - you probably want to follow issues on the plugin's repo, like this one: mauron85/cordova-plugin-background-geolocation#558

The problem is with the plugin, not with Ionic Native.

@n0minal
Copy link

n0minal commented May 3, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants