n.shahab
6 سال پیش توسط n.shahab مطرح شد
0 پاسخ

نصب نشدن یا اجرا نشدن برنامه react native بر روی شبیه ساز ها

با سلام
من یک پروژه جدید با react-native ایجاد کردم در ویندوز 10 ولی با اجرای دستور run-android اجرا نمی شود
من کارهایی که انجام دادم را مختصر می گویم چون فکر می کنم تمام برنامه ها نصب شه و ویندوز تنظیم است نه با *** اجرا می شود نه بدون ان
1 در پاورل شل هم npm نصب هم node
2 جاوا نصب
3 react نصب
4 در سیستم اینوایرمنت اینها ست شده
ANDROID_HOME ---> C:\Users\IHC\AppData\Local\Android\Sdk
JAVA_HOME--> C:\Program Files\Java\jdk-14.0.1
path--> C:\Users\IHC\AppData\Local\Android\Sdk\tools
C:\Users\IHC\AppData\Local\Android\Sdk\platform-tools
C:\Program Files\nodejs\
C:\Users\IHC\AppData\Local\Android\Sdk
C:\Users\IHC\AppData\Local\Android\Sdk\emulator
C:\Program Files\Java\jdk-14.0.1\bin

من ابتدا شبیه ساز جنی موشن را باز می کنم کامل که لود شد در پوشه اپ دستور react-native run-android را می زنم ولی این ارور را دارم .من قبلا در ابونوتو اجرا گرفتم ولی الان در ویندوز نمی شود مچکر می شوم کمک کنید .

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

  • 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. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

PS D:\example-reactnative\react-native\appv0554> react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
(node:9940) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
Jetifier found 967 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

  • 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. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081