leegeunhyeok / react-native-zendesk-messaging

🗣️ Zendesk messaging SDK for React Native
https://www.npmjs.com/package/react-native-zendesk-messaging
MIT License
40 stars 12 forks source link

Gradlew error #3

Closed alxhghs closed 1 year ago

alxhghs commented 1 year ago

Getting an error when running gradlew for an Expo app using this package. After installing the app with npm i react-native-zendesk-messaging the build fails for Android only. It appears that the Zendesk Messaging dependency isn't being linked properly.

Two things that stood out were:

> Could not find zendesk.messaging:messaging-android:2.3.0.

and

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

Curious if there's anything in this package or if it's an Expo issue.

Checking the license for package Android SDK Build-Tools 30.0.3 in /home/expo/Android/Sdk/licenses
License for package Android SDK Build-Tools 30.0.3 accepted.
Preparing "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)".
"Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" ready.
Installing Android SDK Build-Tools 30.0.3 in /home/expo/Android/Sdk/build-tools/30.0.3
"Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" complete.
"Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" finished.
Checking the license for package Android SDK Platform 31 in /home/expo/Android/Sdk/licenses
License for package Android SDK Platform 31 accepted.
Preparing "Install Android SDK Platform 31 (revision: 1)".
"Install Android SDK Platform 31 (revision: 1)" ready.
Installing Android SDK Platform 31 in /home/expo/Android/Sdk/platforms/android-31
"Install Android SDK Platform 31 (revision: 1)" complete.
"Install Android SDK Platform 31 (revision: 1)" finished.
> Configure project :react-native-reanimated
AAR for react-native-reanimated has been found
/home/expo/workingdir/build/node_modules/react-native-reanimated/android/react-native-reanimated-70-hermes.aar
Checking the license for package Android SDK Build-Tools 31 in /home/expo/Android/Sdk/licenses
License for package Android SDK Build-Tools 31 accepted.
Preparing "Install Android SDK Build-Tools 31 (revision: 31.0.0)".
"Install Android SDK Build-Tools 31 (revision: 31.0.0)" ready.
Installing Android SDK Build-Tools 31 in /home/expo/Android/Sdk/build-tools/31.0.0
"Install Android SDK Build-Tools 31 (revision: 31.0.0)" complete.
"Install Android SDK Build-Tools 31 (revision: 31.0.0)" finished.
[stderr] 
FAILURE: Build failed with an exception.
[stderr] 
* What went wrong:
[stderr] 
Could not determine the dependencies of task ':app:processDebugResources'.
[stderr] 
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
[stderr] 
   > Could not find zendesk.messaging:messaging-android:2.3.0.
[stderr] 
     Searched in the following locations:
[stderr] 
       - http://10.4.1.4:8081/artifactory/libs-release/zendesk/messaging/messaging-android/2.3.0/messaging-android-2.3.0.pom
[stderr] 
       - file:/home/expo/.m2/repository/zendesk/messaging/messaging-android/2.3.0/messaging-android-2.3.0.pom
[stderr] 
       - file:/home/expo/workingdir/build/node_modules/react-native/android/zendesk/messaging/messaging-android/2.3.0/messaging-android-2.3.0.pom
[stderr] 
       - file:/home/expo/workingdir/build/node_modules/jsc-android/dist/zendesk/messaging/messaging-android/2.3.0/messaging-android-2.3.0.pom
[stderr] 
       - https://dl.google.com/dl/android/maven2/zendesk/messaging/messaging-android/2.3.0/messaging-android-2.3.0.pom
[stderr] 
       - https://repo.maven.apache.org/maven2/zendesk/messaging/messaging-android/2.3.0/messaging-android-2.3.0.pom
[stderr] 
       - https://www.jitpack.io/zendesk/messaging/messaging-android/2.3.0/messaging-android-2.3.0.pom
[stderr] 
       - file:/home/expo/workingdir/build/node_modules/detox/Detox-android/zendesk/messaging/messaging-android/2.3.0/messaging-android-2.3.0.pom
[stderr] 
     Required by:
[stderr] 
         project :app > project :react-native-zendesk-messaging
[stderr] 
* Try:
[stderr] 
> Run with --stacktrace option to get the stack trace.
[stderr] 
> Run with --info or --debug option to get more log output.
[stderr] 
> Run with --scan to get full insights.
[stderr] 
* Get more help at https://help.gradle.org
[stderr] 
BUILD FAILED in 2m 53s
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.5.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
leegeunhyeok commented 1 year ago

Did you add repository in your build.gradle? https://github.com/leegeunhyeok/react-native-zendesk-messaging/blob/master/docs/getting-started.md#android

maven {
  url "https://zendesk.jfrog.io/artifactory/repo"
}

I'm not sure this library is works on expo project, and I will try do a test soon

cesaros-taxfix commented 1 year ago

@leegeunhyeok Where you able to check if the lib works on expo?

leegeunhyeok commented 1 year ago

@cesaros-taxfix This library not tested on expo yet and currently not supported

I've never used an expo, but I know that need to migrate module for expo. (isolated new module like a expo-react-native-zendesk-messaging)

Need help for migrate because it's too large scale task.

Rakesh199122 commented 1 year ago

Hi, I am getting below error while integrating zendesk version 0.1.0 with react native version 64.2

FAILURE: Build failed with an exception.

Soultion: Have fixed it by changing from implementation "com.facebook.react:react-native" to implementation "com.facebook.react:react-native:+" inside project level build.gradle file of react-native-zendesk-messaging.

leegeunhyeok commented 1 year ago

@Rakesh199122 please check this https://github.com/leegeunhyeok/react-native-zendesk-messaging/issues/14#issuecomment-1550729842

Rakesh199122 commented 1 year ago

@leegeunhyeok Have fixed it by changing from implementation "com.facebook.react:react-native" to implementation "com.facebook.react:react-native:+" inside project level build.gradle file of react-native-zendesk-messaging.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.