Closed devsgtech closed 4 years ago
You have plugins that are incompatible together.
onesignal-cordova-plugin
is incompatible with cordova-plugin-printer
Both will build independently, but when used together they will not build. This is because onesignal-cordova-plugin
doesn't appear to be compatible with version 28 of android support libraries, but cordova-plugin-printer
requires them.
debugRuntimeClasspath - Resolved configuration for runtime for variant: debug
+--- project :CordovaLib
+--- com.onesignal:OneSignal:3.15.1
| +--- com.google.firebase:firebase-messaging:[10.2.1, 17.3.99] -> 17.3.3
| | +--- com.google.android.gms:play-services-basement:16.0.1
| | | \--- com.android.support:support-v4:26.1.0 -> 28 FAILED
| | +--- com.google.android.gms:play-services-tasks:16.0.1
| | | \--- com.google.android.gms:play-services-basement:16.0.1 (*)
| | +--- com.google.firebase:firebase-common:16.0.3
| | | +--- com.google.android.gms:play-services-basement:16.0.1 (*)
| | | \--- com.google.android.gms:play-services-tasks:16.0.1 (*)
| | +--- com.google.firebase:firebase-iid:17.0.3
| | | +--- com.google.android.gms:play-services-basement:16.0.1 (*)
| | | +--- com.google.android.gms:play-services-stats:16.0.1
| | | | \--- com.google.android.gms:play-services-basement:16.0.1 (*)
| | | +--- com.google.android.gms:play-services-tasks:16.0.1 (*)
| | | +--- com.google.firebase:firebase-common:16.0.3 (*)
| | | \--- com.google.firebase:firebase-iid-interop:16.0.1
| | | +--- com.google.android.gms:play-services-base:16.0.1
| | | | +--- com.google.android.gms:play-services-basement:16.0.1 (*)
| | | | \--- com.google.android.gms:play-services-tasks:16.0.1 (*)
| | | \--- com.google.android.gms:play-services-basement:16.0.1 (*)
| | \--- com.google.firebase:firebase-measurement-connector:17.0.1
| | \--- com.google.android.gms:play-services-basement:16.0.1 (*)
| +--- com.android.support:cardview-v7:[26.0.0, 27.99.99] -> 28 FAILED
| +--- com.android.support:support-fragment:[26.0.0, 27.99.99] -> 28 FAILED
| +--- com.android.support:customtabs:[26.0.0, 27.99.99] -> 28 FAILED
| +--- com.google.android.gms:play-services-location:[10.2.1, 16.0.99] -> 15.0.1
| | +--- com.google.android.gms:play-services-base:[15.0.1,16.0.0) -> 16.0.1 (*)
| | +--- com.google.android.gms:play-services-basement:[15.0.1,16.0.0) -> 16.0.1 (*)
| | +--- com.google.android.gms:play-services-places-placereport:[15.0.1,16.0.0) -> 15.0.1
| | | \--- com.google.android.gms:play-services-basement:[15.0.1,16.0.0) -> 16.0.1 (*)
| | \--- com.google.android.gms:play-services-tasks:[15.0.1,16.0.0) -> 16.0.1 (*)
| +--- com.google.android.gms:play-services-ads-identifier:[15.0.0, 16.0.99] -> 16.0.0
| | \--- com.google.android.gms:play-services-basement:16.0.1 (*)
| \--- com.google.android.gms:play-services-base:[10.2.1, 16.1.99] -> 16.0.1 (*)
\--- com.android.support:support-v4:28.+ -> 28 FAILED
I am able to build with api level 28 without any error.
For me, targeting API 28 didn't change anything.
Your options are to:
cordova-plugin-printer
and (hopefully) find an alternativecordova-plugin-printer
to use android support libraries 27+You can do this by running the following commands:
cordova plugin remove cordova-plugin-printer
cordova plugin add cordova-plugin-printer --variable ANDROID_SUPPORT_V4_VERSION="27.+"
The above does allow me to build successfully, however I assume the default was set to 28 for a reason, and I don't know if this will cause runtime errors. If you take this approach, make sure you test your app thoroughly.
Because this isn't a bug with cordova-android
I'll be closing this issue. If you need further assistance, I do invite you to our slack
I have removed printer plugin but still issue is same. I have removed onesignal plugin but issue is still same. Now what to do?
Bug Report
Problem
What is expected to happen?
It is working fine when h build android application with cordova-android@8.0.0 but when i try cordova-android9 it throws error. Please help me solving out this build errors
What does actually happen?
What went wrong: Execution failed for task ':app:mergeDebugResources'.
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 48s 7 actionable tasks: 1 executed, 6 up-to-date Command failed with exit code 1: /Users/apple/Desktop/IonicProjects/JustoDelivery/platforms/android/gradlew cdvBuildDebug -b /Users/apple/Desktop/IonicProjects/JustoDelivery/platforms/android/build.gradle [ERROR] An error occurred while running subprocess cordova.
Information
I have tried with all ionic versions.. but problem is with cordova-android plugin
Command or Code
ionic cordova build android
Environment, Platform, Device
I am building android apk with api level 29 and it throws errors. I am able to build with api level 28 without any error.
Version information
Everything is up to date. Below is package file code
Checklist