I have issue in using react-native-document-picker
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.3k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với node_modules/react-native-document-picker/android/src/main/java/com/reactnativedocumentpicker/RNDocumentPickerModule.java và tác vụ được báo cáo :react-native-document-picker:compileDebugJavaWithJavac. Tái hiện lỗi bằng repository EzWealth với React Native 0.83.1 và thiết lập Android được tài liệu hóa. Được xem là hoàn tất khi dependency biên dịch thành công và ứng dụng Android được build thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, java, react-native
- Lĩnh vực
- build-system, mobile
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100