react / react/react-native

I have issue in using react-native-document-picker

Abierto
#56,433 1 comentario 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Component: Picker Needs: Triage :mag:
Lenguaje dominante
C++
Estrellas
127k
Forks
25.3k
Merge medio
1 d 23 h
PR fusionados (30 d)
4

Descripción

Description

error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:21: error: cannot find symbol
import com.facebook.react.bridge.GuardedResultAsyncTask; ^ symbol: class GuardedResultAsyncTask location: package com.facebook.react.bridge C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:232: error: cannot find symbol private static class ProcessDataTask extends GuardedResultAsyncTask { ^ symbol: class GuardedResultAsyncTask location: class RNDocumentPickerModule C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:226: error: cannot find symbol new ProcessDataTask(getReactApplicationContext(), uris, copyTo, promise).execute(); ^ symbol: method execute() location: class ProcessDataTask C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:246: error: method does not override or implement a method from a supertype @Override ^ C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:255: error: method does not override or implement a method from a supertype @Override ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 5 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-document-picker:compileDebugJavaWithJavac'. > Compilation failed; see the compiler output below. Note: Recompile with -Xlint:deprecation for details. C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:21: error: cannot find symbol import com.facebook.react.bridge.GuardedResultAsyncTask; ^ symbol: class GuardedResultAsyncTask location: package com.facebook.react.bridge C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:232: error: cannot find symbol private static class ProcessDataTask extends GuardedResultAsyncTask { ^ symbol: class GuardedResultAsyncTask location: class RNDocumentPickerModule Note: Some input files use or override a deprecated API. C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:246: error: method does not override or implement a method from a supertype @Override ^ C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:255: error: method does not override or implement a method from a supertype @Override ^ C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:226: error: cannot find symbol new ProcessDataTask(getReactApplicationContext(), uris, copyTo, promise).execute(); ^ symbol: method execute() location: class ProcessDataTask 5 errors * Try: > Check your code and dependencies to fix the compilation error(s) > Run with --scan to generate a Build Scan (Powered by Develocity). BUILD FAILED in 7s.
info Run CLI with --verbose flag for more details.

Steps to reproduce

1.Install the react-native-document-picker.
2. Import DocumentPicker from "react-native-document-picker";
3. It produces that above error

React Native Version

0.83.1

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info
info Fetching system and libraries information...
System:
  OS: Windows 11 10.0.26200
  CPU: (16) x64 13th Gen Intel(R) Core(TM) i5-13400F
  Memory: 16.98 GB / 31.84 GB
Binaries:
  Node:
    version: 20.19.4
    path: C:\nvm4w\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 8.19.4
    path: C:\nvm4w\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "33"
      - "34"
      - "35"
      - "36"
    Build Tools:
      - 30.0.3
      - 34.0.0
      - 35.0.0
      - 36.0.0
      - 36.1.0
    System Images:
      - android-36.1 | Google Play Intel x86_64 Atom
      - android-36 | Google APIs Intel x86_64 Atom
    Android NDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-252.27397.103.2522.14617522
  Visual Studio: Not Found
Languages:
  Java:
    version: 17.0.17
    path: C:\Program Files\Eclipse Adoptium\jdk-17.0.17.10-hotspot\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.2.0
    wanted: 19.2.0
  react-native:
    installed: 0.83.1
    wanted: 0.83.1
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.85.1 is now available (your project is running on v0.83.1).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.85.1
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.83.1&to=0.85.1
info For more info, check out "https://reactnative.dev/docs/upgrading?os=windows".
PS C:\Users\Pc\React Native Projects\EzWealth>
Stacktrace or Logs
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:21: error: cannot find symbol
import com.facebook.react.bridge.GuardedResultAsyncTask; ^ symbol: class GuardedResultAsyncTask location: package com.facebook.react.bridge C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:232: error: cannot find symbol private static class ProcessDataTask extends GuardedResultAsyncTask<ReadableArray> { ^ symbol: class GuardedResultAsyncTask location: class RNDocumentPickerModule C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:226: error: cannot find symbol new ProcessDataTask(getReactApplicationContext(), uris, copyTo, promise).execute(); ^ symbol: method execute() location: class ProcessDataTask C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:246: error: method does not override or implement a method from a supertype @Override ^ C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:255: error: method does not override or implement a method from a supertype @Override ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 5 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-document-picker:compileDebugJavaWithJavac'. > Compilation failed; see the compiler output below. Note: Recompile with -Xlint:deprecation for details. C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:21: error: cannot find symbol import com.facebook.react.bridge.GuardedResultAsyncTask; ^ symbol: class GuardedResultAsyncTask location: package com.facebook.react.bridge C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:232: error: cannot find symbol private static class ProcessDataTask extends GuardedResultAsyncTask<ReadableArray> { ^ symbol: class GuardedResultAsyncTask location: class RNDocumentPickerModule Note: Some input files use or override a deprecated API. C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:246: error: method does not override or implement a method from a supertype @Override ^ C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:255: error: method does not override or implement a method from a supertype @Override ^ C:\Users\Pc\React Native Projects\EzWealth\node_modules\react-native-document-picker\android\src\main\java\com\reactnativedocumentpicker\RNDocumentPickerModule.java:226: error: cannot find symbol new ProcessDataTask(getReactApplicationContext(), uris, copyTo, promise).execute(); ^ symbol: method execute() location: class ProcessDataTask 5 errors * Try: > Check your code and dependencies to fix the compilation error(s) > Run with --scan to generate a Build Scan (Powered by Develocity). BUILD FAILED in 7s.
info Run CLI with --verbose flag for more details.
MANDATORY Reproducer

https://github.com/ananya-techculture/EzWealth

Screenshots and Videos

No response

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con node_modules/react-native-document-picker/android/src/main/java/com/reactnativedocumentpicker/RNDocumentPickerModule.java y la tarea reportada :react-native-document-picker:compileDebugJavaWithJavac. Reprodúcelo usando el repositorio EzWealth con React Native 0.83.1 y la configuración documentada de Android. Se considera terminado cuando la dependencia compila y la aplicación Android se construye correctamente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
android, java, react-native
Área
build-system, mobile
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.