Incompatibility with onesignal plugin - Cordova Android 9.0.0
Closed this issue · 4 comments
- Plugin version:
cordova-plugin-background-geolocation 3.1.0 "CDVBackgroundGeolocation"
cordova-plugin-whitelist 1.3.4 "Whitelist"
onesignal-cordova-plugin 2.11.0 "OneSignal Push Notifications" - Platform: Android
- Cordova version 10.0.0
- Cordova platform version android : 9.0.0 (no problem with 8.1.0)
Hello,
I can't build my project on Android when I use the background geolocation plugin with onesignal plugin.
To reproduce the problem:
-cordova create hello com.example.hello HelloWorld
-cd hello
-cordova platform add android
-cordova plugin add @mauron85/cordova-plugin-background-geolocation
-cordova plugin add onesignal-cordova-plugin
-cordova build android
I get the following messages :
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Configure project :app
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed in version 5.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
WARNING: The onesignal-gradle-plugin MUST be before com.android.application!
Please put onesignal-gradle-plugin first OR update to com.android.tools.build:gradle:3.0.0 or newer!
Task :app:mergeDebugResources
OneSignalPlugin: WARNING: OneSignalPlugin: Downgraded 'com.android.support:26+' -> 28 to prevent compile errors! Recommend updating your project's compileSdkVersion!
Task :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.android.support:support-v4:28.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/support/support-v4/28/support-v4-28.pom
- https://jcenter.bintray.com/com/android/support/support-v4/28/support-v4-28.pom
- https://repo.maven.apache.org/maven2/com/android/support/support-v4/28/support-v4-28.pom
- https://maven.google.com/com/android/support/support-v4/28/support-v4-28.pom
Required by:
project :app
Could not find com.android.support:appcompat-v7:28.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/28/appcompat-v7-28.pom
- https://jcenter.bintray.com/com/android/support/appcompat-v7/28/appcompat-v7-28.pom
- https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/28/appcompat-v7-28.pom
- https://maven.google.com/com/android/support/appcompat-v7/28/appcompat-v7-28.pom
Required by:
project :app
Could not find com.android.support:cardview-v7:28.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/support/cardview-v7/28/cardview-v7-28.pom
- https://jcenter.bintray.com/com/android/support/cardview-v7/28/cardview-v7-28.pom
- https://repo.maven.apache.org/maven2/com/android/support/cardview-v7/28/cardview-v7-28.pom
- https://maven.google.com/com/android/support/cardview-v7/28/cardview-v7-28.pom
Required by:
project :app > com.onesignal:OneSignal:3.15.1
Could not find com.android.support:support-fragment:28.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/support/support-fragment/28/support-fragment-28.pom
- https://jcenter.bintray.com/com/android/support/support-fragment/28/support-fragment-28.pom
- https://repo.maven.apache.org/maven2/com/android/support/support-fragment/28/support-fragment-28.pom
- https://maven.google.com/com/android/support/support-fragment/28/support-fragment-28.pom
Required by:
project :app > com.onesignal:OneSignal:3.15.1
Could not find com.android.support:customtabs:28.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/support/customtabs/28/customtabs-28.pom
- https://jcenter.bintray.com/com/android/support/customtabs/28/customtabs-28.pom
- https://repo.maven.apache.org/maven2/com/android/support/customtabs/28/customtabs-28.pom
- https://maven.google.com/com/android/support/customtabs/28/customtabs-28.pom
Required by:
project :app > com.onesignal:OneSignal:3.15.1
Could not find com.android.support:support-v4:28.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/support/support-v4/28/support-v4-28.pom
- https://jcenter.bintray.com/com/android/support/support-v4/28/support-v4-28.pom
- https://repo.maven.apache.org/maven2/com/android/support/support-v4/28/support-v4-28.pom
- https://maven.google.com/com/android/support/support-v4/28/support-v4-28.pom
Required by:
project :app > com.google.android.gms:play-services-location:15.0.1 > com.google.android.gms:play-services-basement:16.0.1
There's no problem if I uninstall one of the two plugins (background geolocation or onesignal).
Thank you for your help !
Did you try npx jetifier
?
Yeah, I tried, but the result is the same...
Unfortunately, I have the same problem and I can't figure it out..
The problem has been fixed by version 0.12.9 of the OneSignal-Gradle-Plugin.