نصب react native

 نرم افزار موبایل
  آخرین بروزرسانی : 5 سال پیش توسط آرمان بابایی
لینک کوتاه برای اشتراک گذاری:
نوریه فلاحتی ( 3 تجربه )
5 سال پیش

 5

سلام 

من هرچی که برا ریکت نیتیو لازم بود رو نصب کردم الان ک به شبیه ساز وصل میکنم این ارورو میده لطفا رااهنمایی کنین 

http://s3.picofile.com/file/8363447976/Screenshot_19_.png

نوریه فلاحتی ( 3 تجربه )
5 سال پیش

آرمان بابایی ( 354 تجربه )
5 سال پیش

برای حل کردن این مشکل در React-Native به مسیر پروژه برید و این کارها رو انجام بدید:

1- یک پوشه با نام assets در مسیر :

android/app/src/main

ایجاد کنید.

2-سپس این دستور رو در ترمینال و روت پروژه بنویسید و enter کنید:

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

3-سپس این دستور رو در ترمینال وارد کنید:

react-native run-android

اگر مراحل رو به درستی انجام بدید مشکلتون رفع می‌شه.

علی زارع ( 2 تجربه )
5 سال پیش

با سلام

هنگام اجرای دستور react-native run-android  با خظای زیر رویرو میشم

error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

لطفا راهنمایی کنید

ممنون

امیرحسین اکبریان ( 2 تجربه )
5 سال پیش

سلام

من با react-native init <package-name> پروژه جدید میسازم ولی به ارور زیر میخورم:

 react-native init myapps
This will walk you through creating a new React Native project in C:\Proj_react\myapps
Using yarn v1.17.3
Installing react-native...
yarn add v1.17.3
info No lockfile found.
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/react-native: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:3128".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Proj_react\\myapps\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Command failed: yarn add react-native --exact
    at checkExecSyncError (child_process.js:621:11)
    at execSync (child_process.js:657:15)
    at run (C:\Users\Amirhossein\AppData\Roaming\npm\node_modules\react-native-cli\index.js:294:5)
    at createProject (C:\Users\Amirhossein\AppData\Roaming\npm\node_modules\react-native-cli\index.js:249:3)
    at init (C:\Users\Amirhossein\AppData\Roaming\npm\node_modules\react-native-cli\index.js:200:5)
    at Object.<anonymous> (C:\Users\Amirhossein\AppData\Roaming\npm\node_modules\react-native-cli\index.js:153:7)
    at Module._compile (internal/modules/cjs/loader.js:936:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
    at Module.load (internal/modules/cjs/loader.js:790:32)
    at Function.Module._load (internal/modules/cjs/loader.js:703:12) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 8440,
  stdout: null,
  stderr: null
}
Command `yarn add react-native --exact` failed.

آرمان بابایی ( 354 تجربه )
5 سال پیش

لطفاً خواهش میکنم برای هر مشکل یک پست جدید ایجاد کنید.

لینک ایجاد سوال:

https://chasboon.ir/discuss/create

2024 © Copyright کليه حقوق مادی و معنوی براي چسبون محفوظ است و هرگونه کپی برداری پیگرد قانونی دارد.