Pushwoosh-cordova-plugin Compile Error

Hey,

Plugin: pushwoosh-cordova-plugin

Struggling to get my head around this problem. A google seems to go to an article about adjusting the plugin ( https://www.outsystems.com/forums/discussion/88348/pushwoosh-plugin-i-cant-generate-android-app-in-mabs-9/ ), but as this plugin is regularly updated, I can’t imagine this being a global issue otherwise I’d see a lot of complaints about compile errors, so I feel its something configuration or perhaps compiling via Volt Builder causing it. Has anyone else used the pushwoosh-cordova-plugin plugin successfully, and if so, how did you configure your config.xml?

Here is the Debug Log:

The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
cordova-android-play-services-gradle-release: overriding com.google.android.gms:play-services-location:11+ in build.gradle with com.google.android.gms:play-services-location:17.0.0
Checking Java JDK and Android SDK versions
ANDROID_HOME=/opt/android-sdk (recommended setting)
ANDROID_SDK_ROOT=/opt/android-sdk (DEPRECATED)
Using Android SDK: /opt/android-sdk
Reading build config file: /build.json
Reading the keystore from: /agent/voltbuilder/platforms/assets/debug.p12
Starting a Gradle Daemon, 4 incompatible Daemons could not be reused, use --status for details
> Task :wrapper

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 4s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details

> Configure project :app
Adding classpath: com.google.gms:google-services:4.3.10

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preDebugBuild UP-TO-DATE
> Task :CordovaLib:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :CordovaLib:packageDebugRenderscript
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig
> Task :app:javaPreCompileDebug
> Task :app:generateDebugResValues
> Task :CordovaLib:writeDebugAarMetadata

> Task :CordovaLib:compileDebugRenderscript
The RenderScript APIs are deprecated. They will be removed in Android Gradle plugin 9.0. See the following link for a guide to migrate from RenderScript: https://developer.android.com/guide/topics/renderscript/migrate

> Task :CordovaLib:generateDebugResValues
> Task :CordovaLib:generateDebugResources
> Task :app:checkDebugAarMetadata
> Task :CordovaLib:packageDebugResources
> Task :app:mapDebugSourceSetPaths FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mapDebugSourceSetPaths'.
> Error while evaluating property 'extraGeneratedResDir' of task ':app:mapDebugSourceSetPaths'.
   > Failed to calculate the value of task ':app:mapDebugSourceSetPaths' property 'extraGeneratedResDir'.
      > Querying the mapped value of provider(java.util.Set) before task ':app:processDebugGoogleServices' has completed is not supported

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 24s
10 actionable tasks: 10 executed
Command failed with exit code 1: /platforms/android/gradlew -b /platforms/android/build.gradle cdvBuildDebug

2023-09-03 22:39:01,526 - FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mapDebugSourceSetPaths'.
> Error while evaluating property 'extraGeneratedResDir' of task ':app:mapDebugSourceSetPaths'.
See log for full details.
2023-09-03 22:39:01,526 - Build failed ce34dc6b-bd74-4b92-ad67-545e8ac4fa02
2023-09-03 22:39:03,855 - Output: Package              Current  Wanted  Latest  Location                          Depended by
cordova-plugin-file    7.0.0   7.0.0   8.0.0  node_modules/cordova-plugin-file  ce34dc6b-bd74-4b92-ad67-545e8ac4fa02

NB: I know its pushwoosh-cordova-plugin causing the issue, as removing that plugin allows successful compile.

Thanks,

Can you share your config.xml?

Sure! It’s below:

<!-- config.xml reference: https://build.phonegap.com/docs/config-xml -->
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="com.***.it" version="1.3.0" android-versionCode="10010" ios-CFBundleVersion="10010">
   <name>Bookings</name>
   <description>Booking Application</description>
   <author href="https://www.app.com" email="support@app.com">App.com</author>

	
   <preference name="orientation" value="portrait" />
   <preference name="target-device" value="handset" />
   <preference name="prerendered-icon" value="false" />
   <preference name="detect-data-types" value="false" />
   <preference name="exit-on-suspend" value="false" />
   <preference name="disable-cursor" value="false" />
   <preference name="android-installLocation" value="auto" />
   <preference name="DisallowOverscroll" value="true" />
   
   
	<preference name="SplashScreenDelay" value="2000" />
	<preference name="AutoHideSplashScreen" value="true" />
	<preference name="AndroidWindowSplashScreenBackground" value="#000000" />
    
    
   <engine name="ios" spec="latest" />   


    
  <plugin name="cordova-plugin-device" />
  <plugin name="cordova-plugin-dialogs" />
  <plugin name="cordova-plugin-geolocation" />
  <plugin name="cordova-plugin-media" />
  <plugin name="cordova-plugin-globalization" />
  <plugin name="cordova-plugin-network-information" />
  <plugin name="cordova-plugin-vibration" />
  <plugin name="cordova-plugin-actionsheet" />
  <plugin name="cordova-plugin-camera" />
  <plugin name="cordova-plugin-statusbar" />
  <plugin name="cordova-plugin-inappbrowser" />
  <plugin name="cordova-android-play-services-gradle-release" />
  <plugin name="cordova-background-geolocation-plugin" />
  <plugin name="cordova.plugins.diagnostic" />
  <plugin name="pushwoosh-cordova-plugin" />
  
    <plugin name="cordova-plugin-customurlscheme">
  		<variable name="URL_SCHEME" value="gzpit" />
   </plugin>
  

   <plugin name="cordova-plugin-datepicker" source="npm" />

	<access origin="http://*" /> 
	<access origin="https://*" /> 
	<allow-navigation href="*" /> 
	<allow-intent href="*" />

<platform name="android">
		
    <preference name="AndroidXEnabled" value="true" />
    <preference name="android-installLocation" value="auto" />
	<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/splashTemplate.png" />

</platform>

<platform name="ios">
		
		<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
		   <string>We are using the photo library to allow customers to upload a profile photograph of themselves.</string>
		</edit-config>
		
		<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
		   <string>We are using the Camera to allow customers to upload a profile photograph of themselves.</string>
		</edit-config>
		
		<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
		   <string>We are using Location services to assist in the booking process of rides.</string>
		</edit-config>
		
		<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
			<string>We are using the Camera to allow customers to upload a profile photograph of themselves.</string>
		</edit-config>
		<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
			<string>We are using the photo library to allow customers to upload a profile photograph of themselves.</string>
		</edit-config>
		<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
			<string>We are using Location services to assist in the booking process of rides.</string>
		</edit-config>
		<edit-config target="NSPhotoLibraryAddUsageDescription" file="*-Info.plist" mode="merge">
			<string>We are using the photo library to allow customers to upload a profile photograph of themselves and save existing images.</string>
		</edit-config>
</platform>

</widget>

Here’s the exact problem you’re having, and a possible solution: Build error with cordova-android@12 · Issue #391 · Pushwoosh/pushwoosh-phonegap-plugin · GitHub