react-native-pdf icon indicating copy to clipboard operation
react-native-pdf copied to clipboard

error when i try to install react-native-pdf

Open belafdil opened this issue 2 years ago • 6 comments

hello friends when i try to install react-native-pdf i got this error

Task :app:checkDebugAarMetadata FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings 10 actionable tasks: 2 executed, 8 up-to-date

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Failed to transform PdfiumAndroid-1.0.1.aar (com.github.TalbotGooday:PdfiumAndroid:1.0.1) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Could not download PdfiumAndroid-1.0.1.aar (com.github.TalbotGooday:PdfiumAndroid:1.0.1) > Could not get resource 'https://www.jitpack.io/com/github/TalbotGooday/PdfiumAndroid/1.0.1/PdfiumAndroid-1.0.1.aar'. > Read timed out

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2m 5s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Failed to transform PdfiumAndroid-1.0.1.aar (com.github.TalbotGooday:PdfiumAndroid:1.0.1) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Could not download PdfiumAndroid-1.0.1.aar (com.github.TalbotGooday:PdfiumAndroid:1.0.1) > Could not get resource 'https://www.jitpack.io/com/github/TalbotGooday/PdfiumAndroid/1.0.1/PdfiumAndroid-1.0.1.aar'. > Read timed out

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2m 5s

at makeError (C:\Users\Bel\Desktop\Nouveau dossier (3)\umtapp\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at C:\Users\Bel\Desktop\Nouveau dossier (3)\umtapp\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\Bel\Desktop\Nouveau dossier (3)\umtapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\Bel\Desktop\Nouveau dossier (3)\umtapp\node_modules\@react-native-community\cli\build\index.js:192:9)

info Run CLI with --verbose flag for more details.

belafdil avatar Jan 07 '22 08:01 belafdil

I'm not sure, but you might try adding maven { url 'https://www.jitpack.io' } in android/build.gradle under allprojects -> repositories. Like we have here

roryabraham avatar Jan 13 '22 00:01 roryabraham

Hey @roryabraham a tried your solution and this https://github.com/wonday/react-native-pdf/issues/530#issuecomment-756931303 but no success.

Do you have any other ideas of what it could be?

mateus-azevedo avatar May 16 '22 15:05 mateus-azevedo

any update ?

Biplovkumar avatar Jul 28 '22 10:07 Biplovkumar

Try this I think the problem because this https://github.com/wonday/react-native-pdf#android-installation

shiroze avatar Aug 04 '22 04:08 shiroze