{{ thread.title }}

{{ locked_reason }} ری اکت جی اس

@saeid4x {{ experience | farsi }} تجربه آخرین فعالیت ٢ هفته پیش

سلام دوستان

من می خام ریکت نیتیو رو تو شبیه ساز اندروید اجرا کنم ، اما موقع اجرا خطای زیر رو تو CMD نشون میده لطفا بگید چطور این مشکل رو حل کنم؟؟

در ضمن از مراحل زیر برای نصب استفاده کردم:

react-native init AwesomeProject
cd AwesomeProject
react-native run-android

اما پس از اجرای دستور آخر خطای زیر تو CMD ظاهر میشه:


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'AwesomeProject۱۰'.
> Could not resolve all files for configuration ':classpath'.
   > Could not download builder-model.jar (com.android.tools.build:builder-model:۲.۳.۳)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/builder-model/۲.۳.۳/builder-model-۲.۳.۳.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/builder-model/۲.۳.۳/builder-model-۲.۳.۳.jar'.
            > Connect to jcenter.bintray.com:۴۴۳ [jcenter.bintray.com/۱۰۸.۱۶۸.۲۴۳.۱۵۰] failed: Connection timed out: connect
   > Could not download builder-test-api.jar (com.android.tools.build:builder-test-api:۲.۳.۳)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/builder-test-api/۲.۳.۳/builder-test-api-۲.۳.۳.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/builder-test-api/۲.۳.۳/builder-test-api-۲.۳.۳.jar'.
            > Connect to jcenter.bintray.com:۴۴۳ [jcenter.bintray.com/۱۰۸.۱۶۸.۲۴۳.۱۵۰] failed: Connection timed out: connect
   > Could not download sdklib.jar (com.android.tools:sdklib:۲۵.۳.۳)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/sdklib/۲۵.۳.۳/sdklib-۲۵.۳.۳.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/sdklib/۲۵.۳.۳/sdklib-۲۵.۳.۳.jar'.
            > Connect to jcenter.bintray.com:۴۴۳ [jcenter.bintray.com/۱۰۸.۱۶۸.۲۴۳.۱۵۰] failed: Connection timed out: connect
   > Could not download sdk-common.jar (com.android.tools:sdk-common:۲۵.۳.۳)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/sdk-common/۲۵.۳.۳/sdk-common-۲۵.۳.۳.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/sdk-common/۲۵.۳.۳/sdk-common-۲۵.۳.۳.jar'.
            > Connect to jcenter.bintray.com:۴۴۳ [jcenter.bintray.com/۱۰۸.۱۶۸.۲۴۳.۱۵۰] failed: Connection timed out: connect

  Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: ۱ mins ۴۶.۲۴۵ secs
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

NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to C:\Users\saeid\AppData\Local\Android\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

Observed package id 'tools' in inconsistent location 'C:\Users\saeid\AppData\Local\Android\Sdk\__tools' (Expected 'C:\Users\saeid\AppData\Local\Android\Sdk\tools')
java.io.FileNotFoundException: https://dl.google.com/android/repository/repository2-1.xml
Failed to download any source lists!

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find Build Tools revision 26.0.3

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 22.903 secs
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
shahryarjb ویرایش شده توسط @shahryarjb