Issue
I am using Angular 8 and Ionic 4 for app development
My app is completed and working on update now
In update I am trying to add push notification, so to get the registration id of android device,
I am using ionic doc link : https://ionicframework.com/docs/native/push
Command From Doc : ionic cordova plugin add phonegap-plugin-push
After installing the above command I noticed that it is adding more libraries in below path
Path : /app/platforms/android/project.properties
Before Installing
target=android-28
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.system.library.1=com.squareup.okhttp3:okhttp-urlconnection:3.10.0
cordova.system.library.2=com.android.support:support-annotations:27.+
cordova.gradle.include.1=cordova-plugin-googlemaps/ecommerce-tbxml-android.gradle
cordova.gradle.include.2=cordova-plugin-googlemaps/ecommerce-pgm-custom.gradle
cordova.system.library.3=com.android.support:support-v4:24.1.1+
cordova.system.library.4=com.razorpay:checkout:1.5.12
cordova.system.library.5=com.google.android.gms:play-services-analytics:11.0.1
After Installing
target=android-28
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.system.library.1=com.squareup.okhttp3:okhttp-urlconnection:3.10.0
cordova.system.library.2=com.android.support:support-annotations:27.+
cordova.gradle.include.1=cordova-plugin-googlemaps/ecommerce-tbxml-android.gradle
cordova.gradle.include.2=cordova-plugin-googlemaps/ecommerce-pgm-custom.gradle
cordova.system.library.3=com.android.support:support-v4:24.1.1+
cordova.system.library.4=com.razorpay:checkout:1.5.12
cordova.system.library.5=com.google.android.gms:play-services-analytics:11.0.1
cordova.gradle.include.3=cordova-support-google-services/rostail-build.gradle
cordova.gradle.include.4=phonegap-plugin-multidex/rostail-multidex.gradle
cordova.system.library.6=com.android.support:support-v13:27.+
cordova.system.library.7=me.leolin:ShortcutBadger:1.1.17@aar
cordova.system.library.8=com.google.firebase:firebase-messaging:17.0.+
and because of this file change I am getting some version conflict error while run below command
Command : ionic cordova run android
This command I am using to debug the app into my device, want to check if registration id is getting or not
But I am getting an issue
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.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-stats:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-common@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-basement@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-iid@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-places-placereport@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-tasks@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-location@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-iid-interop@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-base@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-maps@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-messaging@17.0.+
-- Project 'app' depends onto com.google.android.gms:play-services-stats@15.0.1
-- Project 'app' depends onto com.google.firebase:firebase-messaging@17.0.0
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
* 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 19s
3 actionable tasks: 1 executed, 2 up-to-date
/var/www/html/apps/app/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.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-stats:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-common@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-measurement-connector@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-basement@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-iid@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-places-placereport@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-tasks@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-location@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-iid-interop@16.0.0
-- Project 'app' depends onto com.google.android.gms:play-services-base@16.0.1
-- Project 'app' depends onto com.google.android.gms:play-services-maps@16.0.0
-- Project 'app' depends onto com.google.firebase:firebase-messaging@17.0.+
-- Project 'app' depends onto com.google.android.gms:play-services-stats@15.0.1
-- Project 'app' depends onto com.google.firebase:firebase-messaging@17.0.0
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
* 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 19s
[ERROR] An error occurred while running subprocess cordova.
cordova build android --device exited with exit code 1.
Re-running this command with the --verbose flag may provide more
information.
And If I comment the below line in project.properties then it install the app in my device but getting Error : "error string resource id #0x0", while trying to get registration id from device.
cordova.gradle.include.3=cordova-support-google-services/rostail-build.gradle
Solution
Finally after 2 days I got the solution and its works for me :)!!
I have changed the version of play-services-analytics in below path
Path : platforms/android/project.properties
cordova.system.library.3=com.google.android.gms:play-services-analytics:11.0.1
To
cordova.system.library.3=com.google.android.gms:play-services-analytics:17.0.0
And follow the below forum
https://forum.ionicframework.com/t/d8-program-type-already-present/166812/4
Answered By - user3709901
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.