Сбой сборки и сбой приложения после добавления @react-native-voice/voice в React Native 0.75 во время обновления версииAndroid

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 Сбой сборки и сбой приложения после добавления @react-native-voice/voice в React Native 0.75 во время обновления версии

Сообщение Anonymous »

В настоящее время я обновляю проект React Native с версии 0.68 до 0.75. Хотя я успешно обновил все остальные пакеты, у меня возникли проблемы с @react-native-voice/voice.
Приложение работает отлично, когда этот пакет удален, но как только я добавьте его обратно, сборка завершится неудачей и приложение выйдет из строя. Я попробовал следовать официальной документации и проверил совместимость, но мне не удалось решить проблему.
Обнаруженная проблема (полный журнал):

Код: Выделить всё

> react-native run-android

(node:95592) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
info Installing the app...

> Configure project :react-native-firebase_app
:react-native-firebase_app package.json found at F:\ZURU\SmartHomeApp\node_modules\@react-native-firebase\app\package.json
:react-native-firebase_app:firebase.bom using default value: 33.5.1
:react-native-firebase_app:play.play-services-auth using default value: 21.2.0
:react-native-firebase_app package.json found at F:\ZURU\SmartHomeApp\node_modules\@react-native-firebase\app\package.json
:react-native-firebase_app:version set from package.json: 21.6.1 (21,6,1 - 21006001)
:react-native-firebase_app:android.compileSdk using custom value: 35
:react-native-firebase_app:android.targetSdk using custom value: 34
:react-native-firebase_app:android.minSdk using custom value: 24
:react-native-firebase_app:reactNativeAndroidDir F:\ZURU\SmartHomeApp\node_modules\react-native\android

> Configure project :react-native-firebase_auth
:react-native-firebase_auth package.json found at F:\ZURU\SmartHomeApp\node_modules\@react-native-firebase\auth\package.json
:react-native-firebase_app package.json found at F:\ZURU\SmartHomeApp\node_modules\@react-native-firebase\app\package.json
:react-native-firebase_auth:firebase.bom using default value: 33.5.1
:react-native-firebase_auth package.json found at F:\ZURU\SmartHomeApp\node_modules\@react-native-firebase\auth\package.json
:react-native-firebase_auth:version set from package.json: 21.6.1 (21,6,1 - 21006001)
:react-native-firebase_auth:android.compileSdk using custom value: 35
:react-native-firebase_auth:android.targetSdk using custom value: 34
:react-native-firebase_auth:android.minSdk using custom value: 24
:react-native-firebase_auth:reactNativeAndroidDir F:\ZURU\SmartHomeApp\node_modules\react-native\android

> Configure project :react-native-firebase_crashlytics
:react-native-firebase_crashlytics package.json found at F:\ZURU\SmartHomeApp\node_modules\@react-native-firebase\crashlytics\package.json
:react-native-firebase_app package.json found at F:\ZURU\SmartHomeApp\node_modules\@react-native-firebase\app\package.json
:react-native-firebase_crashlytics:firebase.bom using default value: 33.5.1
:react-native-firebase_crashlytics package.json found at F:\ZURU\SmartHomeApp\node_modules\@react-native-firebase\crashlytics\package.json
:react-native-firebase_crashlytics:version set from package.json: 21.6.1 (21,6,1 - 21006001)
:react-native-firebase_crashlytics:android.compileSdk using custom value: 35
:react-native-firebase_crashlytics:android.targetSdk using custom value: 34
:react-native-firebase_crashlytics:android.minSdk using custom value: 24
:react-native-firebase_crashlytics:reactNativeAndroidDir F:\ZURU\SmartHomeApp\node_modules\react-native\android

> Configure project :react-native-reanimated
Android gradle plugin: 8.6.0
Gradle: 8.7

> Task :react-native-voice_voice:packageDebugResources FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
137 actionable tasks: 5 executed, 132 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor.  To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':react-native-voice_voice:packageDebugResources' (type 'MergeResources').
- Gradle detected a problem with the following location: 'F:\ZURU\SmartHomeApp\node_modules\@react-native-voice\voice\android\build\generated\res\resValues\debug'.

Reason: Task ':react-native-voice_voice:packageDebugResources' uses this output of task ':@react-native-voice_voice:generateDebugResValues' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

Possible solutions:
1. Declare task ':@react-native-voice_voice:generateDebugResValues' as an input of ':react-native-voice_voice:packageDebugResources'.
2. Declare an explicit dependency on ':@react-native-voice_voice:generateDebugResValues' from ':react-native-voice_voice:packageDebugResources' using Task#dependsOn.
3. Declare an explicit dependency on ':@react-native-voice_voice:generateDebugResValues' from ':react-native-voice_voice:packageDebugResources' using Task#mustRunAfter.

For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* 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 2s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: A problem was found with the configuration of task ':react-native-voice_voice:packageDebugResources' (type 'MergeResources'). - Gradle detected a problem with the following location: 'F:\ZURU\SmartHomeApp\node_modules\@react-native-voice\voice\android\build\generated\res\resValues\debug'. Reason: Task ':react-native-voice_voice:packageDebugResources' uses this output of task ':@react-native-voice_voice:generateDebugResValues' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Possible solutions: 1. Declare task ':@react-native-voice_voice:generateDebugResValues' as an input of ':react-native-voice_voice:packageDebugResources'. 2. Declare an explicit dependency on ':@react-native-voice_voice:generateDebugResValues' from ':react-native-voice_voice:packageDebugResources' using Task#dependsOn. 3. Declare an explicit dependency on ':@react-native-voice_voice:generateDebugResValues' from ':react-native-voice_voice:packageDebugResources' using Task#mustRunAfter. For more information, please refer to https://docs.gradle.org/8.7/userguide/validation_problems.html#implicit_dependency in the Gradle documentation. * 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 2s.
Что я пробовал:
  • Проверил AndroidManifest.xml на предмет неправильной конфигурации.
  • Проверены версии Gradle (8.7) и совместимость плагина Android Gradle (8.6.0).
  • Удален и переустановлен пакет.
  • Подтверждено что другие зависимости работают отлично.
Окружающая среда:
  • Версия React Native: 0.75.4
    @react-native-voice/voice Версия: последняя (по состоянию на декабрь 2024 г.)
  • Версия Gradle: 8.7
    < li>Плагин Android Gradle: 8.6.0
  • Версия Node.js: 22.12.0
  • ОС: Windows 11
Я подозреваю, что проблема может быть связана с зависимостями задач Gradle или совместимостью Android SDK/NDK, но я не знаю, как ее решить. Если кто-нибудь успешно интегрировал @react-native-voice/voice в React Native 0.75, я буду признателен за ваши идеи или решения.

Подробнее здесь: https://stackoverflow.com/questions/793 ... react-nati
Реклама
Ответить Пред. темаСлед. тема

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

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

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

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

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

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