Задача:реагировать-native-image-picker:compileDebugJavaWithJavac FAILEDAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Задача:реагировать-native-image-picker:compileDebugJavaWithJavac FAILED

Сообщение Anonymous »

У меня есть проект по обновлению пользовательского интерфейса, но каждый раз, когда я запускаю приложение с помощью npx response-native run android, оно выдает ошибку:
Task :react-native-image-picker:compileDebugJavaWithJavac 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.7/userguide/c ... e_warnings
302 actionable tasks: 2 executed, 300 up-to-date
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/a ... generic/02 to old ns http://schemas.android.com/repository/a ... generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/ ... sitory2/02 to old ns http://schemas.android.com/sdk/android/ ... sitory2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/ ... sitory2/03 to old ns http://schemas.android.com/sdk/android/ ... sitory2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are ,,
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:135: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
^
symbol: variable TIRAMISU
location: class VERSION_CODES
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:143: error: cannot find symbol
libraryIntent = new Intent(MediaStore.ACTION_PICK_IMAGES);
^
symbol: variable ACTION_PICK_IMAGES
location: class MediaStore
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:147: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
^
symbol: variable TIRAMISU
location: class VERSION_CODES
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:152: error: cannot find symbol
if (selectionLimit == 0) maxNum = MediaStore.getPickImagesMaxLimit();
^
symbol: method getPickImagesMaxLimit()
location: class MediaStore
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:153: error: cannot find symbol
libraryIntent.putExtra(MediaStore.EXTRA_PICK_IMAGES_MAX, maxNum);
^
symbol: variable EXTRA_PICK_IMAGES_MAX
location: class MediaStore
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:162: error: cannot find symbol
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
^
symbol: variable TIRAMISU
location: class VERSION_CODES
6 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-image-picker:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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 1m 58s

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
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/a ... generic/02 to old ns http://schemas.android.com/repository/a ... generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/ ... sitory2/02 to old ns http://schemas.android.com/sdk/android/ ... sitory2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/ ... sitory2/03 to old ns http://schemas.android.com/sdk/android/ ... sitory2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are ,,
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:135: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
^
symbol: variable TIRAMISU
location: class VERSION_CODES
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:143: error: cannot find symbol
libraryIntent = new Intent(MediaStore.ACTION_PICK_IMAGES);
^
symbol: variable ACTION_PICK_IMAGES
location: class MediaStore
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:147: error: cannot find symbol
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
^
symbol: variable TIRAMISU
location: class VERSION_CODES
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:152: error: cannot find symbol
if (selectionLimit == 0) maxNum = MediaStore.getPickImagesMaxLimit();
^
symbol: method getPickImagesMaxLimit()
location: class MediaStore
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:153: error: cannot find symbol
libraryIntent.putExtra(MediaStore.EXTRA_PICK_IMAGES_MAX, maxNum);
^
symbol: variable EXTRA_PICK_IMAGES_MAX
location: class MediaStore
C:\Users\CURTIS\Downloads\efik\node_modules\react-native-image-picker\android\src\main\java\com\imagepicker\ImagePickerModule.java:162: error: cannot find symbol
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
^
symbol: variable TIRAMISU
location: class VERSION_CODES
6 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-image-picker:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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 1m 58s

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


Подробнее здесь: https://stackoverflow.com/questions/738 ... vac-failed
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»