Reputation: 81
Okey, so I'm working on an ionic app for android and this week I updated the plugins, cordova and ionic and it won't build the apk any more. I know the problem is with the firebase pluguin, but I don't know how to fix it.
I created a new ionic project, installed cordova latest version and builded the apk, it works. I added the firebase plugin (ionic cordova plugin add cordova-plugin-firebase + npm install @ionic-native/firebase) and tried to build the apk, but I get the following error:
BUILD FAILED in 1s
C:\Users\jmir\goInstall\platforms\android\gradlew: Command failed with
exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.0.0,17.0.0], [17.2.0,17.2.0]], but resolves to 17.2.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
* 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 1s
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I can't show you some code, because I really didn't changed anything, just added the plugin I need.
I've tried with old versions of ionic, cordova and firebase, still get the same error.
Upvotes: 5
Views: 2358
Reputation: 581
Ionic Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check
This problems occurs is because of fcm so
1).first remove platform
ionic cordova platform rm android
2).Remove fcm
cordova plugin rm cordova-plugin-firebase-lib
3).Add Platform
ionic cordova platform add android@latest
4).Add fcm
ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated
npm install @ionic-native/fcm
5)ionic cordova build android
Upvotes: 2