صفحه اصلی چهارم انجمن ها react native اجرای react-native روی جنی موشن

در حال نمایش 4 نوشته (از کل 4)
  • نویسنده
    نوشته‌ها
  • #54938 پاسخ
    zamany1370
    مشارکت کننده

    سلام
    من برنامه ری اکت نیتیو را بر روی جنی موشن میخواهم اجرا کنم از دستور npm run android استفاده میکنم ولی برنامه من را روی جنی موشن اجرا نمی کند و ارور زیر را میدهد
    npm ERR! code ENOENT
    npm ERR! syscall open
    npm ERR! path D:\program\Android studeo\Android SDK Full\Android SDK Full\platfo
    rm-tools\package.json
    npm ERR! errno -4058
    npm ERR! enoent ENOENT: no such file or directory, open ‘D:\program\Android stud
    eo\Android SDK Full\Android SDK Full\platform-tools\package.json’
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\sayan\AppData\Roaming\npm-cache\_logs\2021-04-12T18_25_16_
    089Z-debug.log

    #54940 پاسخ
    zamany1370
    مشارکت کننده

    info Running jetifier to migrate libraries to AndroidX. You can disable it using “–no-jetifier” flag.
    Jetifier found 903 file(s) to forward-jetify. Using 8 workers…
    info Starting JS server…
    ‘adb’ is not recognized as an internal or external command,
    operable program or batch file.
    info Launching emulator…
    error Failed to launch emulator. Reason: No emulators found as an output of emulator -list-avds.
    warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
    info Installing the app…

    ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files (x86)\Java\jdk1.6.0_45

    Please set the JAVA_HOME variable in your environment to match the
    location of your Java installation.

    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

    at makeError (D:\dev\project\SellMe\node_modules\execa\index.js:174:9)
    at D:\dev\project\SellMe\node_modules\execa\index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async runOnAllDevices (D:\dev\project\SellMe\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
    at async Command.handleAction (D:\dev\project\SellMe\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)
    info Run CLI with –verbose flag for more details.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! SellMe@0.0.1 android: react-native run-android
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the SellMe@0.0.1 android script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\sayan\AppData\Roaming\npm-cache\_logs\2021-04-12T18_38_21_958Z-debug.log
    این هم ارور اجرا روی گوشی یا جنی موشنه

    #54939 پاسخ
    zamany1370
    مشارکت کننده

    در ضمن برای اچرای روی گوشی یا جنی موشن هم ارور زیر را میدهد
    info Running jetifier to migrate libraries to AndroidX. You can disable it using “–no-jetifier” flag.
    Jetifier found 903 file(s) to forward-jetify. Using 8 workers…
    info Starting JS server…
    ‘adb’ is not recognized as an internal or external command,
    operable program or batch file.
    info Launching emulator…
    error Failed to launch emulator. Reason: No emulators found as an output of emulator -list-avds.
    warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
    info Installing the app…

    ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files (x86)\Java\jdk1.6.0_45

    Please set the JAVA_HOME variable in your environment to match the
    location of your Java installation.

    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

    at makeError (D:\dev\project\SellMe\node_modules\execa\index.js:174:9)
    at D:\dev\project\SellMe\node_modules\execa\index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async runOnAllDevices (D:\dev\project\SellMe\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
    at async Command.handleAction (D:\dev\project\SellMe\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)
    info Run CLI with –verbose flag for more details.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! SellMe@0.0.1 android: react-native run-android
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the SellMe@0.0.1 android script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\sayan\AppData\Roaming\npm-cache\_logs\2021-04-12T18_38_21_958Z-debug.log

    #55030 پاسخ
    مهدی
    مدیرکل

    سلام؟
    داره میگه متغیر JAVA_HOME آدرسی که براش مشخص شده معتبر نیست

در حال نمایش 4 نوشته (از کل 4)
پاسخ به: پاسخ#54939 در اجرای react-native روی جنی موشن
اطلاعات شما: