wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.6k stars 558 forks source link

Could not resolve all artifacts for configuration ':react-native-pdf:classpath'. #691

Open paddu1246 opened 2 years ago

paddu1246 commented 2 years ago

A problem occurred configuring project ':react-native-pdf'.

Could not resolve all artifacts for configuration ':react-native-pdf:classpath'. Could not resolve com.android.tools.build:gradle:3.1.4. Required by: project :react-native-pdf Could not resolve com.android.tools.build:gradle:3.1.4. Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'. Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

description = 'react-native-pdf'

buildscript { repositories { mavenCentral() google() }

dependencies {
    classpath 'com.android.tools.build:gradle:3.1.4'
}

}

repositories { mavenCentral() maven { url 'https://jitpack.io' content { // Use Jitpack only for AndroidPdfViewer; the rest is hosted at mavenCentral. includeGroup "com.github.TalbotGooday" } } }

apply plugin: 'com.android.library'

def _ext = rootProject.ext

def _reactNativeVersion = _ext.has('reactNative') ? _ext.reactNative : '+' def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 28 def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '28.0.3' def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 16 def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 28

android { compileSdkVersion _compileSdkVersion buildToolsVersion _buildToolsVersion

defaultConfig {
    minSdkVersion _minSdkVersion
    targetSdkVersion _targetSdkVersion
}

lintOptions {
    abortOnError true
}

packagingOptions {
   pickFirst 'lib/x86/libc++_shared.so'
   pickFirst 'lib/x86_64/libjsc.so'
   pickFirst 'lib/x86_64/libc++_shared.so'
   pickFirst 'lib/arm64-v8a/libjsc.so'
   pickFirst 'lib/arm64-v8a/libc++_shared.so'
   pickFirst 'lib/armeabi-v7a/libc++_shared.so'
}

}

dependencies { implementation "com.facebook.react:react-native:${_reactNativeVersion}" // NOTE: The original repo at com.github.barteksc is abandoned by the maintainer; there will be no more updates coming from that repo. // It was taken over by com.github.TalbotGooday; from now on please use this repo until (if ever) the Barteksc repo is resumed. implementation 'com.github.TalbotGooday:AndroidPdfViewer:3.1.0-beta.3' implementation 'com.google.code.gson:gson:2.8.5' }

paddu1246 commented 2 years ago

react-native-pdf : 6.6.2 version only

please help any one regarding this issue

Thanks advance