zoho / SalesIQ-Mobilisten-Cordova

SalesIQ Mobilisten plugin for Apache Cordova/PhoneGap/Ionic.
https://mobilisten.io
7 stars 4 forks source link

Execution failed for task ':app:mergeDebugResources' while running ionic cordova build android #15

Closed tasemgt closed 3 weeks ago

tasemgt commented 1 month ago

Hello.

I get the following error when I run ionic cordova build android

`FAILURE: Build failed with an exception.

This happened after running the command

cordova plugin add https://github.com/zoho/SalesIQ-Mobilisten-Cordova.git

And the error goes away when I remove the plugin.

Kindly help resolve this please?

Here's my ionic info

`Ionic:

Ionic CLI : 6.20.8 (C:\Users\predator\AppData\Roaming\nvm\v14.20.0\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 6.0.10 @angular-devkit/build-angular : 13.2.6 @angular-devkit/schematics : 13.2.5 @angular/cli : 13.2.6 @ionic/angular-toolkit : 6.1.0

Cordova:

Cordova CLI : 11.1.0 Cordova Platforms : android 10.1.2 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 13 other plugins)

Utility:

cordova-res : 0.15.4 native-run : 1.5.0

System:

NodeJS : v14.20.0 (C:\Program Files\nodejs\node.exe) npm : 6.14.17 OS : Windows 10`

bhahirathan-mb-11956 commented 1 month ago

Hi @tasemgt,

Thank you for reaching out to us. Kindly try updating your android gradle plugin and gradle version to the latest version and try building the app again.

sample snippet:

build.gradle

...
classpath 'com.android.tools.build:gradle:7.3.1'
...

gradle-wrapper.properties

...
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
...

If the issue persists, please don't hesitate to contact our support team at support@zohosalesiq.com. We'll be more than happy to assist you further.

Regards, Bhahirathan M Zoho SalesIQ.

tasemgt commented 1 month ago

Hi @bhahirathan-mb-11956

Thanks for your reply.

I updated my gradle to v8.9 but the issue still persisted. I went ahead to downgrade the cordova-zohosalesiq-mobilisten plugin version from v7 to v4 and i was able to build my project with no errors.

But I'd like this to work with the latest version of this cordova plugin.

What could be the reason for this?

I could also email your support team if that'd be more effective.

Thanks.

bhahirathan-mb-11956 commented 1 month ago

Hi @tasemgt,

Are you still facing the issue even after changing the AGP version like the below snippet? classpath 'com.android.tools.build:gradle:7.3.1' If the issue persists, please contact us at support@zohosalesiq.com. We will be happy to investigate this issue further for you.

tasemgt commented 1 month ago

Hi @tasemgt,

Are you still facing the issue even after changing the AGP version like the below snippet? classpath 'com.android.tools.build:gradle:7.3.1' If the issue persists, please contact us at support@zohosalesiq.com. We will be happy to investigate this issue further for you.

Hi @bhahirathan-mb-11956 ,

Thanks for reaching out. I was able to solve the problem and install the cordova-zohosalesiq-mobilisten v7 plugin after I made changes to my platforms\android\app\build.gradle file with the following code.

targetSdkVersion 34 compileSdkVersion 33

Note that: The targetSdkVersion was set to 34, while the compileSdkVersion at 33. This was important to build without errors.

Thank you.

bhahirathan-mb-11956 commented 3 weeks ago

Hi @tasemgt,

We are happy to hear that the issue is fixed, but also make sure about all the behaviour changes of Android 14 once in you app before moving live as you have updated the targetSdk to 34.

If you have any other queries, please write us at (support@zohosalesiq.com). We will be happy to help.

Best regards, Bhahirathan M Zoho SalesIQ.