I am working with ionic's phonegap-push-plugin
after installing this plugin I an unable to make build
getting following error:
BUILD FAILED in 0s
21 actionable tasks: 1 executed, 20 up-to-date
(node:30863) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /home/earth/UnicusGit/unicusApp/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.+.
I have tried below command for updating version of com.google.android.gms to 10.+.
cordova plugin add cordova-android-play-services-gradle-release --variable PLAY_SERVICES_VERSION=10.+
but it does not work for me.
For this error, please check your FCm version while installing phonegap plugin, It help me to resolve my conflict.
I have used following command for specifying version of fcm version:
ionic cordova plugin add phonegap-plugin-push --variable FCM_VERSION=17.3.2
Related
OS:
MacOS
Platform:
Android
SDK:
#sentry/react-native (2.0.0)
react-native version: 0.61.4
Are you using Expo?
No
Are you using sentry.io or on-premise?
sentry.io (SaaS)
I have following issue:
When I try to to build the project by this command
npx react-native run-android
It fires this error
Task :sentry_react-native:compileDebugJavaWithJavac FAILED
570 actionable tasks: 3 executed, 567 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sentry_react-native:compileDebugJavaWithJavac'.
> java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
Expected result:
The project should be built without issue
Have you tried first doing
yarn add jetifier and then npx jetify
Then building your app.
Try this and do let me know in case of any concerns.
It worked when I switched
#sentry/react-native to version "^1.3.8"
looks it was a conflict with Gradle version
When I create basic IONIC 4 application and run > ionic cordova build android
it works fine and apk generated.
When I add plugin firebase > ionic cordova plugin add cordova-plugin-firebase
It failed to build application.
ERROR:
\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 [[16.5.0,16.5.0], [16.4.0,16.4.0]], but resolves to 16.5.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
I have an Ionic Cordova app that I have not touched in a few months. I wanted to make a small tweak to the app today and release it but when I did, I started having a dependency issue.
When I try to run 'ionic cordova run android' the build fails. Even without making any changes to the app (revert all changes and try to build what worked for the last APK) it still is failing. I have tried uninstalling the cordova intercom plugin and that changed nothing. I have also tried updating all of my npm packages and that did not help either.
This is the error log I get:
cordova run android
Android Studio project detected
cordova-android-firebase-gradle-release: Android platform: cordova-android#7
cordova-android-firebase-gradle-release: No custom version found in config.xml - using plugin default
cordova-android-play-services-gradle-release: Android platform: cordova-android#7
cordova-android-play-services-gradle-release: No custom version found in config.xml - using plugin default
cordova-android-support-gradle-release: Android platform: cordova-android#7
cordova-android-support-gradle-release: No custom version found in config.xml - using plugin default
Preparing Firebase on Android
ANDROID_HOME=C:\Users\Boogaloo\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_171
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
cordova-android-firebase-gradle-release: 15.0.0
cordova-android-play-services-gradle-release: 15.0.0
cordova-android-support-gradle-release: 27.+
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_8vin5yy2zwz3fxyzepqpp0rqu.run(C:\Users\Boogaloo\WebstormProjects\IONIC\projects\myapp\platforms\android\app\build.gradle:151)
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\Boogaloo\WebstormProjects\IONIC\projects\myapp\platforms\android\cordova-plugin-intercom\savings-build-extras-intercom.gradle' line: 71
What went wrong:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:compile'.
Could not find com.google.android.gms:strict-version-matcher-plugin:15.0.0.
Searched in the following locations:
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
https://jcenter.bintray.com/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
https://jcenter.bintray.com/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
https://maven.google.com/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
https://maven.google.com/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
https://repo1.maven.org/maven2/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
https://dl.google.com/dl/android/maven2/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
Required by:
project :app > com.google.gms:google-services:4.2.0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 3s
(node:3432) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\Boogaloo\WebstormProjects\IONIC\projects\myapp\platforms\android\cordova-plugin-intercom\savings-build-extras-intercom.gradle' line: 71
What went wrong:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:compile'.
Could not find com.google.android.gms:strict-version-matcher-plugin:15.0.0.
Searched in the following locations:
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/google/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
file:/C:/Users/Boogaloo/AppData/Local/Android/Sdk/extras/android/m2repository/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
https://jcenter.bintray.com/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
https://jcenter.bintray.com/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
https://maven.google.com/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
https://maven.google.com/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
https://repo1.maven.org/maven2/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
https://dl.google.com/dl/android/maven2/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.pom
https://dl.google.com/dl/android/maven2/com/google/android/gms/strict-version-matcher-plugin/15.0.0/strict-version-matcher-plugin-15.0.0.jar
Required by:
project :app > com.google.gms:google-services:4.2.0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 3s
at ChildProcess.whenDone (C:\Users\Boogaloo\WebstormProjects\IONIC\projects\myapp\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:3432) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3432) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Update
I tried updating the cordova android platform to 7.1.0 but it hasn't helped.
I can't seem to delete the cordova firebase plugin using the command
ionic cordova plugin remove cordova-plugin-firebase
Do you use cordova-plugin-firebase?
If so,
run ionic cordova plugin remove cordova-plugin-firebase and try building again.
If it works, ionic cordova plugin add cordova-plugin-firebase#2.0.5
Please help,
I was trying to update my android platform version to 7.1.0 but lots of problems came out, so I decided to put back the version 6.3.0 but when I did I could not compile anymore, when I try to compile for Android that's the error I get:
:processArmv7DebugManifest
/Users/francisco/ionic-projects/jungery2/platforms/android/AndroidManifest.xml:52:5-74 Error:
uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [org.xwalk:xwalk_core_library:23.53.589.4] /Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/23.53.589.4/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="org.xwalk.core" to force usage
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
:processArmv7DebugManifest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processArmv7DebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [org.xwalk:xwalk_core_library:23.53.589.4] /Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/23.53.589.4/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="org.xwalk.core" to force usage
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 15.71 secs
Error: /Users/francisco/ionic-projects/jungery2/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/francisco/ionic-projects/jungery2/platforms/android/AndroidManifest.xml:52:5-74 Error:
uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [org.xwalk:xwalk_core_library:23.53.589.4] /Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/23.53.589.4/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="org.xwalk.core" to force usage
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processArmv7DebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [org.xwalk:xwalk_core_library:23.53.589.4] /Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/23.53.589.4/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="org.xwalk.core" to force usage
I am not sure where can I find this:
minSdkVersion 15
Edit 1:
> cordova plugin ls
com.googlemaps.ios 2.7.0 "Google Maps SDK for iOS"
com.telerik.plugins.nativepagetransitions 0.6.5 "Native Page Transitions"
cordova-plugin-add-swift-support 1.7.2 "AddSwiftSupport"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-contacts 3.0.1 "Contacts"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-email-composer 0.8.15 "EmailComposer"
cordova-plugin-facebook4 1.10.1 "Facebook Connect"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-globalization 1.11.0 "Globalization"
cordova-plugin-googleplus 5.3.2 "Google SignIn"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.1.4 "cordova-plugin-ionic-webview"
cordova-plugin-linkedin 1.2.1 "LinkedIn"
cordova-plugin-mauron85-background-geolocation 2.3.6 "CDVBackgroundGeolocation"
cordova-plugin-media 5.0.2 "Media"
cordova-plugin-nativeaudio 3.0.9 "Cordova Native Audio"
cordova-plugin-nativegeocoder 2.0.5 "NativeGeocoder"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-streaming-media 2.1.3 "StreamingMedia"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
cordova-sqlite-storage 0.7.14 "Cordova sqlite storage plugin"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 6.0.8 "BarcodeScanner"
phonegap-plugin-push 2.2.3 "PushPlugin"
twitter-connect-plugin 0.6.0 "Twitter Connect"
Edit 2:
Error: /Users/francisco/ionic-projects/jungery2/platforms/android/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.
/Users/francisco/ionic-projects/jungery2/platforms/android/res/xml/authenticator.xml:2:81-93: AAPT: No resource found that matches the given name (at 'icon' with value '#mipmap/icon').
/Users/francisco/ionic-projects/jungery2/platforms/android/res/xml/authenticator.xml:2:147-159: AAPT: No resource found that matches the given name (at 'smallIcon' with value '#mipmap/icon').
/Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/res/merged/armv7/debug/xml/authenticator.xml:2: error: Error: No resource found that matches the given name (at 'icon' with value '#mipmap/icon').
/Users/francisco/ionic-projects/jungery2/platforms/android/build/intermediates/res/merged/armv7/debug/xml/authenticator.xml:2: error: Error: No resource found that matches the given name (at 'smallIcon' with value '#mipmap/icon').
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processArmv7DebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
Anyone can help?
It looks to me like your crosswalk plugin version changed during this process. If you can check what version you had before your upgrade/downgrade (in your config.xml), then you can explicitly install the version you used to have. If you don't happen to have that under source control, it looks to me like the minSdkVersion of 16 was added to Crosswalk version 2.0.0. If you're forced to guess about what version you used to have, try something like 1.8.0 (or earlier).
UPDATE
Based on the barcode scanner comments, I would try one of these two options:
Add a min SDK version in your config.xml that is >=16. Looks like the barcode scanner plugin may not overwrite it if you have it set >=16.
<preference name="android-minSdkVersion" value="16" />
Try updating the barcode scanner to 7.1+
I have an ionic application shows error when i run ionic cordova build android
BUILD FAILED in 4s (node:5692) UnhandledPromiseRejectionWarning:
Unhandled promise rejection (rejection id: 1): Error:
/home/bharathi/ionic/hourli/platforms/android/gradlew: Command failed
with exit code 1 Error output: FAILURE: Build failed with an
exception.
What went wrong: Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
projects.properties
target=android-26
android.library.reference.1=CordovaLib
cordova.system.library.1=com.android.support:appcompat-v7:23+
cordova.gradle.include.1=com.synconset.imagepicker/app-ignorelinterrors.gradle
cordova.gradle.include.2=com.synconset.imagepicker/app-androidtarget.gradle
cordova.gradle.include.3=cordova-plugin-badge/app-badge.gradle
cordova.system.library.2=com.facebook.android:facebook-android-sdk:4.+
cordova.system.library.3=com.google.android.gms:play-services-auth:11.6.2
cordova.system.library.4=com.google.android.gms:play-services-identity:11.6.2
cordova.system.library.5=com.android.support:support-v4:+
cordova.gradle.include.4=cordova-plugin-local-notification/app-localnotification.gradle
cordova.system.library.6=com.android.support:support-v4:24.1.1+
cordova.system.library.7=com.android.support:support-v4:26.+
cordova.system.library.8=com.android.support:support-v13:26.+
cordova.system.library.9=me.leolin:ShortcutBadger:1.1.17#aar
cordova.system.library.10=com.google.firebase:firebase-messaging:11.6.2
cordova.gradle.include.5=phonegap-plugin-push/app-push.gradle
build.gradle
defaultConfig {
multiDexEnabled true
}
i have added multiDexEnabled in build.gradle,still getting the same error when i try to build.I tried after
ionic cordova platform rm android
ionic cordova platform add android
but still getting the same error
It occured for me. Fixed with:
cordova clean
After 2 days trying to fix it I found a solution, in my case the following plugins caused a crash: cordova-admob-sdk, cordova-plugin-firebase and I changed manually the play-services-ads version in "project.properties" and "build.gradle" files from "com.google.android.gms:play-services-ads:+" to "com.google.android.gms:play-services-ads:16.0.0"