Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android does not build with RN 0.71.4 #154

Open
mmckinley8 opened this issue Sep 13, 2023 · 5 comments
Open

Android does not build with RN 0.71.4 #154

mmckinley8 opened this issue Sep 13, 2023 · 5 comments

Comments

@mmckinley8
Copy link

mmckinley8 commented Sep 13, 2023

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' }

@hdwilber
Copy link

hdwilber commented Sep 18, 2023

I had to update like this to have this working. Hope it helps:
patch

@ahmed-abdelkader-00
Copy link

Did you manage to fix it?
I tried the above patch and it is not working for me

@hdwilber
Copy link

@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'
        }
    }
}

@ahmed-abdelkader-00
Copy link

Actually it was adding this along with cleaning project that helped me to get it to work
Thanks by the way

@adembacajdev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants