Description:
I updated react-native-onesignal
3.6.3 from 3.4.0 and I followed the instructions but when I run react-native run-android
it fails with the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':react-native-onesignal:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':react-native-onesignal:debugCompileClasspath'.
> Could not find com.google.android.gms:play-services-ads-identifier:12.0.1.
Required by:
project :react-native-onesignal > com.onesignal:OneSignal:3.12.5
Environment
Anything else:
There is a similar issue: https://github.com/OneSignal/react-native-onesignal/issues/938 but it doesn't help me.
@HristoEftimov Please double check you have correctly added the OneSignal Gradle Plugin as it normally resolves issues like this.
https://documentation.onesignal.com/docs/react-native-sdk-setup#section-adding-the-gradle-plugin
If not you can run the following to see what resulted in picking that specific version:
./gradlew app:dependencies --info
The issue is most likely another plugin picking an old version if the above does not help. Also check for resolutionStrategy
anywhere in your project or node_modules as this can be forcing an old version.
@jkasten2 Thank you very much for the answer. The ./gradlew app:dependencies --info
helped me a lot find the dependency that requires this 12.0.1 version 🌞
I usually use this command to check any issue in gradle
./gradlew test
Most helpful comment
@HristoEftimov Please double check you have correctly added the OneSignal Gradle Plugin as it normally resolves issues like this.
https://documentation.onesignal.com/docs/react-native-sdk-setup#section-adding-the-gradle-plugin
If not you can run the following to see what resulted in picking that specific version:
./gradlew app:dependencies --info
The issue is most likely another plugin picking an old version if the above does not help. Also check for
resolutionStrategy
anywhere in your project or node_modules as this can be forcing an old version.