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

Android build fails due to dependency specification pulling in Android SDK 26 alpha #309

Closed
plul opened this issue Jun 29, 2017 · 2 comments

Comments

@plul
Copy link

plul commented Jun 29, 2017

Build fails on Android, possibly due to conflicting dependencies with other Cordova plugins.

Typing grep -rnE . -e "v4:\+" provides me with:

./plugins/cordova-plugin-mauron85-background-geolocation/android/plugin/build.gradle:34:    compile 'com.android.support:support-v4:+'
./plugins/cordova-plugin-mauron85-background-geolocation/plugin.xml:24:        <framework src="com.android.support:support-v4:+" />

I suspect that the build failure is due to this, as it pulls in alpha versions of Android SDK 26. See here: dpa99c/cordova-diagnostic-plugin#212

Environment

  • Project framework: Ionic 3
  • Background-geolocation plugin version: 2.2.5
  • Cordova Android version: 6.2.3
  • Cordova version: 7.0.1

Cordova plugins

com.danielsogl.cordova.clipboard 1.0.2 "Clipboard"
com.googlemaps.ios 2.2.0-fixed "Google Maps SDK for iOS"
cordova-plugin-appminimize 1.0 "AppMinimize"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.7 "Console"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-googlemaps 1.4.0 "phonegap-googlemaps-plugin"
cordova-plugin-mauron85-background-geolocation 2.2.5 "CDVBackgroundGeolocation"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"

Debug logs

Error: /home/metafeta/Projects/getQueried/what/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/metafeta/Projects/getQueried/what/platforms/android/AndroidManifest.xml:27:9-31 Error:
	Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31
	is also present at [com.android.support:support-v4:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1).
	Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:25:5-27:34 to override.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31
  	is also present at [com.android.support:support-v4:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1).
  	Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:25:5-27:34 to override.
@albe
Copy link

albe commented Aug 22, 2017

I can verify.
The issue is indeed the unspecified "com.android.support:support-v4:+" version, this needs to be changed to "com.android.support:support-v4:23.+" and everything works again.

@mauron85
Copy link
Owner

Notice: this issue has been closed because it has been reported for branch 2.x or later. It could be already fixed in v3 or is not relevant anymore. You may reopen this issue if it has been closed in error.

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

3 participants