Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
109 stars 139 forks source link

Build error with cordova-android@12 #391

Closed Jahrenski closed 9 months ago

Jahrenski commented 10 months ago

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 9 months ago

Should be fixed with the latest release.

monbutiong commented 1 month ago

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?

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

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

enginseer-dev commented 1 month ago

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.