Pushwoosh/pushwoosh-phonegap-plugin

Build error with cordova-android@12

Closed this issue · 3 comments

Hi guys, we are upgrading our app to use cordova-android@12 which targets android sdk 33 (min-sdk set at 27).
But the pushwoosh plugin will throw an error during build :

> Configure project :app
Adding classpath: com.google.gms:google-services:4.3.10
WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.

> 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 :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

The issue is that the minimum version for com.google.gms:google-services is 4.3.15 but the pushwoosh plugin requests v4.3.10.

The workaround is to force usage of version 4.3.15 in Config.xml file with this preference :

<preference name="GradlePluginGoogleServicesVersion" value="4.3.15" />

wfhm commented

Should be fixed with the latest release.

Hi there, I'm facing difficulties with integrating similar plugins into my Cordova Vue.js project. Despite successfully installing the plugins and adding the specified line in my config file as advised in this thread, I'm still encountering build errors. Would you be able to help me resolve this issue?

================================================================================

  • What went wrong:
    Execution failed for task ':app:mergeReleaseResources'.

Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
Could not find com.intentfilter:android-permissions:0.1.7.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/intentfilter/android-permissions/0.1.7/android-permissions-0.1.7.pom
- https://repo.maven.apache.org/maven2/com/intentfilter/android-permissions/0.1.7/android-permissions-0.1.7.pom
Required by:
project :app

  • 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.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 30s
7 actionable tasks: 2 executed, 5 up-to-date
Command failed with exit code 1: EEEA:\geo-bg\src-cordova\platforms\android\gradlew :app:bundleRelease -b EEEA:\geo-bg\src-cordova\platforms\android\build.gradle

App • Command "cordova" failed with exit code: 1

App • ⚠️ FAIL Cordova CLI has failed

Hello, @monbutiong

It appears that the build process is unable to find a specific dependency (com.intentfilter:android-permissions:0.1.7).

Add mavenCentral() as repository, in order to let Gradle download the AAR:
https://mvnrepository.com/artifact/com.intentfilter/android-permissions/0.1.8

In future please create a new issue for a problem that you encounter.
Posting in an old or closed issue might result in your question being overlooked.