react / react/react-native

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

オープン
#56,433 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Component: Picker Needs: Triage :mag:
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

node_modules/react-native-document-picker/android/src/main/java/com/reactnativedocumentpicker/RNDocumentPickerModule.java と、報告された :react-native-document-picker:compileDebugJavaWithJavac タスクから始めます。React Native 0.83.1 と文書化された Android セットアップを使用して、EzWealth リポジトリで再現します。依存関係がコンパイルされ、Android アプリが正常にビルドされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, java, react-native
領域
build-system, mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。