react-native-zendesk-chat
react-native-zendesk-chat copied to clipboard
Android does not build with RN 0.71.4
Fails with the following error:
> Could not resolve com.zendesk:chat:3.1.0.
Required by:
project :app
project :app > project :react-native-zendesk-chat
> Could not resolve com.zendesk:chat:3.1.0.
> Could not get resource 'https://zendesk.jfrog.io/zendesk/repo/com/zendesk/chat/3.1.0/chat-3.1.0.pom'.
> Could not GET 'https://zendesk.jfrog.io/zendesk/repo/com/zendesk/chat/3.1.0/chat-3.1.0.pom'.
> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve com.zendesk:messaging:5.1.0.
Required by:
project :app
project :app > project :react-native-zendesk-chat
> Could not resolve com.zendesk:messaging:5.1.0.
> Could not get resource 'https://zendesk.jfrog.io/zendesk/repo/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'.
> Could not GET 'https://zendesk.jfrog.io/zendesk/repo/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'.
> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I have added the dependencies to the build.gradle like the docs suggest:
api group: 'com.zendesk', name: 'chat', version: '2.2.0'
api group: 'com.zendesk', name: 'messaging', version: '4.3.1'
I also tried:
api group: 'com.zendesk', name: 'chat', version: safeExtGet('zendeskChatVersion', '3.1.0')
api group: 'com.zendesk', name: 'messaging', version: safeExtGet('zendeskMessagingVersion', '5.1.0')
And added maven url: maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
I had to update like this to have this working. Hope it helps: patch
Did you manage to fix it? I tried the above patch and it is not working for me
@ahmed-abdelkader-00 , TBH I am not sure how to fix the issue.
You can try by adding this in android/build.gradle
file of your project
allprojects {
repositories {
maven {
url 'https://zendesk.jfrog.io/zendesk/repo'
}
}
}
Actually it was adding this along with cleaning project that helped me to get it to work Thanks by the way
Now with the new react native version, there is no allProjects object anymore, and adding
maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
into projects object does not work. Do this, add complete allProjects object like below:
`buildscript { ext { buildToolsVersion = "34.0.0" minSdkVersion = 24 compileSdkVersion = 34 targetSdkVersion = 34 ndkVersion = "25.1.8937393" kotlinVersion = "1.8.0" } repositories { google() mavenCentral() // Don't add it here } dependencies { classpath("com.android.tools.build:gradle") classpath("com.facebook.react:react-native-gradle-plugin") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") classpath 'com.google.gms:google-services:4.4.0' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9' } // Add it here, after the other dependencies allprojects { repositories { maven { url 'https://zendesk.jfrog.io/zendesk/repo' } } } }
apply plugin: "com.facebook.react.rootproject" `
this worked for me