Build Issue
See original GitHub issueYour Environment
- Plugin version: current
- Platform: Android
- OS version: N/A
- Device manufacturer and model: N/A
- Cordova version (
cordova -v
): - Cordova platform version (
cordova platform ls
): 6.3.0 - Plugin configuration options:
- Link to your project:
Context
I want to build my app with this plugin via phonegap, it is OK if I register plugin by adding following line into my config.xml:
<plugin name="cordova-plugin-mauron85-background-geolocation"/>
However, because I have to use another plugin and I follow the instruction you mentioned to set specific google play version and android support library version by the line below, it failed as the log post below.
<plugin name="cordova-plugin-mauron85-background-geolocation"> <variable name="GOOGLE_PLAY_SERVICES_VERSION" value="11+" /> <variable name="ANDROID_SUPPORT_LIBRARY_VERSION" value="23+" /> <variable name="ALWAYS_USAGE_DESCRIPTION" value="App requires background tracking enabled" /> <variable name="MOTION_USAGE_DESCRIPTION" value="App requires motion detection" /> </plugin>
the plugin I am trying to use with yours is cordova-plugin-camera-preview
Expected Behavior
Actual Behavior
Possible Fix
Steps to Reproduce
Context
Yes, app can’t be built
Debug logs
BUILD FAILED
Total time: 2.77 secs Error: /gradlew: Command failed with exit code 1 Error output: Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. /src/com/marianhello/bgloc/sync/SyncAdapter.java:149: error: constructor Builder in class Builder cannot be applied to given types; builder = new NotificationCompat.Builder(getContext(), NotificationHelper.SYNC_CHANNEL_ID); ^ required: Context found: Context,String reason: actual and formal argument lists differ in length /src/com/marianhello/bgloc/sync/SyncAdapter.java:214: error: constructor Builder in class Builder cannot be applied to given types; NotificationCompat.Builder builder = new NotificationCompat.Builder(getContext(), NotificationHelper.SYNC_CHANNEL_ID); ^ required: Context found: Context,String reason: actual and formal argument lists differ in length /src/com/marianhello/bgloc/NotificationHelper.java:51: error: constructor Builder in class Builder cannot be applied to given types; NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext, NotificationHelper.SERVICE_CHANNEL_ID); ^ required: Context found: Context,String reason: actual and formal argument lists differ in length 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. 3 errors
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ‘:compileDebugJavaWithJavac’.
Compilation failed; see the compiler error output for details.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
ANDROID_SUPPORT_LIBRARY_VERSION 23 seems not to be compatible (it’s too old). But I think you can workaround this issue by replacing lines in plugin.xml
with
I can’t find the those two lines that you were referring to. I am using 2.3.6. Am I missing something? I’m having a similar issue where I got an build time error. Thanks