taskrabbit / react-native-zendesk-chat

React Native Wrapper around Zendesk Chat v2
MIT License
130 stars 126 forks source link

Could not find com.google.android:flexbox:2.0.1 required by project :app > com.zendesk:messaging:5.2.2 #129

Closed jbagaresgaray closed 2 years ago

jbagaresgaray commented 2 years ago

Hello, I've just adding the chat sdk to my react native android project and I got this

   > Could not find com.google.android:flexbox:2.0.1.
     Searched in the following locations:
       - file:/C:/Users/phili/Projects/Purpl/react-native-zendesk/node_modules/react-native/android/com/google/android/flexbox/2.0.1/flexbox-2.0.1.pom
       - file:/C:/Users/phili/Projects/Purpl/react-native-zendesk/node_modules/jsc-android/dist/com/google/android/flexbox/2.0.1/flexbox-2.0.1.pom
       - https://repo.maven.apache.org/maven2/com/google/android/flexbox/2.0.1/flexbox-2.0.1.pom
       - https://dl.google.com/dl/android/maven2/com/google/android/flexbox/2.0.1/flexbox-2.0.1.pom
       - https://www.jitpack.io/com/google/android/flexbox/2.0.1/flexbox-2.0.1.pom
       - https://zendesk.jfrog.io/zendesk/repo/com/google/android/flexbox/2.0.1/flexbox-2.0.1.pom
     Required by:
         project :app > com.zendesk:messaging:5.2.2

my build.gradle(app module)

implementation group: 'com.zendesk', name: 'chat', version: '3.3.2' implementation group: 'com.zendesk', name: 'messaging', version: '5.2.2'

Version 0.67.2

Output of npx react-native info System:
OS: Windows 10 10.0.22000
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Memory: 10.16 GB / 31.93 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodej Yarn: 1.22.17 - ~\AppData\Roaming\npm\ npm: 8.1.0 - C:\Program Files\nodejs\n Watchman: 20210110.135312.0 - C:\Progr SDKs:
Android SDK:
API Levels: 21, 22, 23, 24, 25, 26, Build Tools: 28.0.3, 29.0.2, 30.0.2, System Images: android-24 | Google A Google Play Intel x86 Atom, android-29 | Android NDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Version 2020.3.0.0 Visual Studio: Not Found
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found react: 17.0.2 => 17.0.2
react-native: 0.67.2 => 0.67.2
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

jvgeee commented 2 years ago

I think for this project (as per readme) you're meant to be using 2.2.0 and 4.3.1 respectively, e.g.

    api group: 'com.zendesk', name: 'chat', version: '2.2.0'
    api group: 'com.zendesk', name: 'messaging', version: '4.3.1'
jbagaresgaray commented 2 years ago

@jvgeee despite of following the guide from README... still that error occurs as well...

jbagaresgaray commented 2 years ago

UPDATE: already resolved this issue by

on android/app/build.gradle

dependencies {
     ....
    implementation 'com.google.android:flexbox:2.0.1' // Add this line

   api group: 'com.zendesk', name: 'chat', version: '2.2.0'
   api group: 'com.zendesk', name: 'messaging', version: '4.3.1'
}

on android/build.gradle

allprojects {
    repositories {
         .....
        maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
        jcenter() // --> Add jcenter after maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
    }
}
dhanazam commented 1 year ago

I solved this issue by upgrading the messaging library to 5.2.3 and replacing the jcenter() with mavenCentral()

mmckinley8 commented 9 months ago

I'm still having this issue. Any other updates?