Ошибка при запуске собственного проекта Android React с пакетом @react-native-community/cli-platform-androidAndroid

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 Ошибка при запуске собственного проекта Android React с пакетом @react-native-community/cli-platform-android

Сообщение Anonymous »

У меня есть нативный проект, над которым я не работал уже 2 месяца, теперь, когда я пытаюсь его запустить, я получаю следующие ошибки:

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

PS C:\workspace\projects\Streaker> npm run android

> [email protected] android
> react-native run-android

info A dev server is already running for this project on port 8081.
info Installing the app...

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.

* Where:
Settings file 'C:\workspace\projects\Streaker\android\settings.gradle' line: 2

* What went wrong:
A problem occurred evaluating settings 'streaker'.
> Could not read script 'C:\workspace\projects\Streaker\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' as it does not exist.

* 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 1s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where: Settings file 'C:\workspace\projects\Streaker\android\settings.gradle' line: 2 * What went wrong: A problem occurred evaluating settings 'streaker'. > Could not read script 'C:\workspace\projects\Streaker\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' as it does not exist. * 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 1s.
info Run CLI with --verbose flag for more details.
это мой android/settings.gradle:

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

rootProject.name = 'streaker'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
а это мой android/build.gradle:

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

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33

// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
}
}
Я пробовал:
  • Удалить модули узла и переустановить
  • Запустите ./gradlew clean внутри /android
  • Сопоставление версий React Native и @react-native-community/cli-platform-android с версией 15.1.2
Будем благодарны за любую помощь.

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

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

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

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

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

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

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