آموزش جاوااسکریپت › انجمن ها › react native › اجرا نشدن پروژه React Native بر روی هیچ چیز
برچسب ها: react-native
- این موضوع 5 پاسخ، 2 کاربر را دارد و آخرین بار در 3 سال، 6 ماه پیش بدست مهدی حسن زاده بهروزرسانی شده است.
-
نویسندهنوشتهها
-
mohammad_aliمشارکت کننده
درود
من توی ویندوز 7 پروژه react native رو با npm گرفتم جاوا 14 یا 9 و گریدل خیلی از ورژن ها و دیوایس سخت افزاری و …
توی cmd – ورژن های جاوا و گریدل رو می گیرم
از قند شکن سایفون و dns شکن هم استفاده می کنم
تمام نود و …. را دوباره نصب کردم و حتی با یک ویندوز دیگه
همه مورد رو تست کردم ولی اپ اجرا نمی شه
تا زمان نصب اپ خوب پیش می ره ولی از اینجا ارور ها شوع می شه
تنها از طریق expo تونستم ولی تمایلی با کار به این روش ندارم
به نظر خودم از گریدل هست و باید با یک قند شکن مناسب انجام بشه
اون کد های ارور زمان بیلد رو می زارم دوستان قبلا همچین مشکلی داشتن
ممنون
مهدی حسن زادهمدیرکلسلام .هیچ کدوم از عکس ها نمایش داده نمیشن.
mohammad_aliمشارکت کنندهMicrosoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.C:\Users\Mohammad>java -version
java version “1.8.0_92”
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)C:\Users\Mohammad>gradle -v
————————————————————
Gradle 6.0.1
————————————————————Build time: 2019-11-18 20:25:01 UTC
Revision: fad121066a68c4701acd362daf4287a7c309a0f5Kotlin: 1.3.50
Groovy: 2.5.8
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 1.8.0_92 (Oracle Corporation 25.92-b14)
OS: Windows 10 10.0 amd64C:\rnn>react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using “–no-jetifier” flag.
Jetifier found 863 file(s) to forward-jetify. Using 8 workers…
info Starting JS server…
* daemon not running; starting now at tcp:5037
* daemon started successfully
info Installing the app…
Downloading https://services.gradle.org/distributions/gradle-5.5-all.zip
…………………………………………………………………………………………………………………Welcome to Gradle 5.5!
Here are the highlights of this release:
– Kickstart Gradle plugin development with gradle init
– Distribute organization-wide Gradle properties in custom Gradle distributions
– Transform dependency artifacts on resolutionFor more details see https://docs.gradle.org/5.5/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Configure project :app
Checking the license for package Android SDK Platform 28 in C:\Android\android-sdk\licenses
License for package Android SDK Platform 28 accepted.
Preparing “Install Android SDK Platform 28 (revision: 6)”.
“Install Android SDK Platform 28 (revision: 6)” ready.
Installing Android SDK Platform 28 in C:\Android\android-sdk\platforms\android-28
“Install Android SDK Platform 28 (revision: 6)” complete.
“Install Android SDK Platform 28 (revision: 6)” finished.FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ‘:app:preDebugBuild’.
> Could not resolve all task dependencies for configuration ‘:app:debugRuntimeClasspath’.
> Could not resolve com.facebook.infer.annotation:infer-annotation:0.11.2.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.facebook.infer.annotation:infer-annotation:0.11.2.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/facebook/infer/annotation/infer-annotation/0.11.2/infer-annotation-0.11.2.pom’.
> Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/facebook/infer/annotation/infer-annotation/0.11.2/infer-annotation-0.11.2.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.infer.annotation:infer-annotation:0.11.2.
> Could not get resource ‘https://jcenter.bintray.com/com/facebook/infer/annotation/infer-annotation/0.11.2/infer-annotation-0.11.2.pom’.
> Could not HEAD ‘https://jcenter.bintray.com/com/facebook/infer/annotation/infer-annotation/0.11.2/infer-annotation-0.11.2.pom’.
> Received fatal alert: handshake_failure
> Could not resolve androidx.appcompat:appcompat:1.0.2.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve androidx.appcompat:appcompat:1.0.2.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom’.
> Could not GET ‘https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom’.
> Received fatal alert: handshake_failure
> Could not resolve androidx.appcompat:appcompat:1.0.2.
> Could not get resource ‘https://jcenter.bintray.com/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom’.
> Could not GET ‘https://jcenter.bintray.com/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.fresco:fresco:2.0.0.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.facebook.fresco:fresco:2.0.0.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/facebook/fresco/fresco/2.0.0/fresco-2.0.0.pom’.
> Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/facebook/fresco/fresco/2.0.0/fresco-2.0.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.fresco:fresco:2.0.0.
> Could not get resource ‘https://jcenter.bintray.com/com/facebook/fresco/fresco/2.0.0/fresco-2.0.0.pom’.
> Could not HEAD ‘https://jcenter.bintray.com/com/facebook/fresco/fresco/2.0.0/fresco-2.0.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.fresco:imagepipeline-okhttp3:2.0.0.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.facebook.fresco:imagepipeline-okhttp3:2.0.0.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/facebook/fresco/imagepipeline-okhttp3/2.0.0/imagepipeline-okhttp3-2.0.0.pom’.
> Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/facebook/fresco/imagepipeline-okhttp3/2.0.0/imagepipeline-okhttp3-2.0.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.fresco:imagepipeline-okhttp3:2.0.0.
> Could not get resource ‘https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/2.0.0/imagepipeline-okhttp3-2.0.0.pom’.
> Could not HEAD ‘https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/2.0.0/imagepipeline-okhttp3-2.0.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.soloader:soloader:0.6.0.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.facebook.soloader:soloader:0.6.0.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/facebook/soloader/soloader/0.6.0/soloader-0.6.0.pom’.
> Could not GET ‘https://dl.google.com/dl/android/maven2/com/facebook/soloader/soloader/0.6.0/soloader-0.6.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.soloader:soloader:0.6.0.
> Could not get resource ‘https://jcenter.bintray.com/com/facebook/soloader/soloader/0.6.0/soloader-0.6.0.pom’.
> Could not GET ‘https://jcenter.bintray.com/com/facebook/soloader/soloader/0.6.0/soloader-0.6.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okhttp3:okhttp:3.12.1.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.squareup.okhttp3:okhttp:3.12.1.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom’.
> Could not GET ‘https://dl.google.com/dl/android/maven2/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okhttp3:okhttp:3.12.1.
> Could not get resource ‘https://jcenter.bintray.com/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom’.
> Could not GET ‘https://jcenter.bintray.com/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okhttp3:okhttp-urlconnection:3.12.1.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.squareup.okhttp3:okhttp-urlconnection:3.12.1.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/squareup/okhttp3/okhttp-urlconnection/3.12.1/okhttp-urlconnection-3.12.1.pom’.
> Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/squareup/okhttp3/okhttp-urlconnection/3.12.1/okhttp-urlconnection-3.12.1.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okhttp3:okhttp-urlconnection:3.12.1.
> Could not get resource ‘https://jcenter.bintray.com/com/squareup/okhttp3/okhttp-urlconnection/3.12.1/okhttp-urlconnection-3.12.1.pom’.
> Could not HEAD ‘https://jcenter.bintray.com/com/squareup/okhttp3/okhttp-urlconnection/3.12.1/okhttp-urlconnection-3.12.1.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okio:okio:1.15.0.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.squareup.okio:okio:1.15.0.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom’.
> Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okio:okio:1.15.0.
> Could not get resource ‘https://jcenter.bintray.com/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom’.
> Could not HEAD ‘https://jcenter.bintray.com/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom’.
> Received fatal alert: handshake_failure* 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 16m 8s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with –verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ‘:app:preDebugBuild’.
> Could not resolve all task dependencies for configuration ‘:app:debugRuntimeClasspath’.
> Could not resolve com.facebook.infer.annotation:infer-annotation:0.11.2.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.facebook.infer.annotation:infer-annotation:0.11.2.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/facebook/infer/annotation/infer-annotation/0.11.2/infer-annotation-0.11.2.pom’.
> Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/facebook/infer/annotation/infer-annotation/0.11.2/infer-annotation-0.11.2.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.infer.annotation:infer-annotation:0.11.2.
> Could not get resource ‘https://jcenter.bintray.com/com/facebook/infer/annotation/infer-annotation/0.11.2/infer-annotation-0.11.2.pom’.
> Could not HEAD ‘https://jcenter.bintray.com/com/facebook/infer/annotation/infer-annotation/0.11.2/infer-annotation-0.11.2.pom’.
> Received fatal alert: handshake_failure
> Could not resolve androidx.appcompat:appcompat:1.0.2.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve androidx.appcompat:appcompat:1.0.2.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom’.
> Could not GET ‘https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom’.
> Received fatal alert: handshake_failure
> Could not resolve androidx.appcompat:appcompat:1.0.2.
> Could not get resource ‘https://jcenter.bintray.com/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom’.
> Could not GET ‘https://jcenter.bintray.com/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.fresco:fresco:2.0.0.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.facebook.fresco:fresco:2.0.0.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/facebook/fresco/fresco/2.0.0/fresco-2.0.0.pom’.
> Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/facebook/fresco/fresco/2.0.0/fresco-2.0.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.fresco:fresco:2.0.0.
> Could not get resource ‘https://jcenter.bintray.com/com/facebook/fresco/fresco/2.0.0/fresco-2.0.0.pom’.
> Could not HEAD ‘https://jcenter.bintray.com/com/facebook/fresco/fresco/2.0.0/fresco-2.0.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.fresco:imagepipeline-okhttp3:2.0.0.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.facebook.fresco:imagepipeline-okhttp3:2.0.0.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/facebook/fresco/imagepipeline-okhttp3/2.0.0/imagepipeline-okhttp3-2.0.0.pom’.
> Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/facebook/fresco/imagepipeline-okhttp3/2.0.0/imagepipeline-okhttp3-2.0.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.fresco:imagepipeline-okhttp3:2.0.0.
> Could not get resource ‘https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/2.0.0/imagepipeline-okhttp3-2.0.0.pom’.
> Could not HEAD ‘https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/2.0.0/imagepipeline-okhttp3-2.0.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.soloader:soloader:0.6.0.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.facebook.soloader:soloader:0.6.0.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/facebook/soloader/soloader/0.6.0/soloader-0.6.0.pom’.
> Could not GET ‘https://dl.google.com/dl/android/maven2/com/facebook/soloader/soloader/0.6.0/soloader-0.6.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.facebook.soloader:soloader:0.6.0.
> Could not get resource ‘https://jcenter.bintray.com/com/facebook/soloader/soloader/0.6.0/soloader-0.6.0.pom’.
> Could not GET ‘https://jcenter.bintray.com/com/facebook/soloader/soloader/0.6.0/soloader-0.6.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okhttp3:okhttp:3.12.1.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.squareup.okhttp3:okhttp:3.12.1.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom’.
> Could not GET ‘https://dl.google.com/dl/android/maven2/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okhttp3:okhttp:3.12.1.
> Could not get resource ‘https://jcenter.bintray.com/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom’.
> Could not GET ‘https://jcenter.bintray.com/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okhttp3:okhttp-urlconnection:3.12.1.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.squareup.okhttp3:okhttp-urlconnection:3.12.1.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/squareup/okhttp3/okhttp-urlconnection/3.12.1/okhttp-urlconnection-3.12.1.pom’.
> Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/squareup/okhttp3/okhttp-urlconnection/3.12.1/okhttp-urlconnection-3.12.1.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okhttp3:okhttp-urlconnection:3.12.1.
> Could not get resource ‘https://jcenter.bintray.com/com/squareup/okhttp3/okhttp-urlconnection/3.12.1/okhttp-urlconnection-3.12.1.pom’.
> Could not HEAD ‘https://jcenter.bintray.com/com/squareup/okhttp3/okhttp-urlconnection/3.12.1/okhttp-urlconnection-3.12.1.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okio:okio:1.15.0.
Required by:
project :app > com.facebook.react:react-native:0.61.0
> Could not resolve com.squareup.okio:okio:1.15.0.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom’.
> Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom’.
> Received fatal alert: handshake_failure
> Could not resolve com.squareup.okio:okio:1.15.0.
> Could not get resource ‘https://jcenter.bintray.com/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom’.
> Could not HEAD ‘https://jcenter.bintray.com/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom’.
> Received fatal alert: handshake_failure* 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 16m 8s
at checkExecSyncError (child_process.js:630:11)
at execFileSync (child_process.js:648:15)
at runOnAllDevices (C:\rnn\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (C:\rnn\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:179:41)
at C:\rnn\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:133:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Command.handleAction (C:\rnn\node_modules\@react-native-community\cli\build\index.js:182:9)C:\rnn>
مهدی حسن زادهمدیرکلتو فایل build.gradle به صورت دستی خط زیر رو اضافی کنید
implementation com.facebook.infer.annotation:infer-annotation:0.11.2mohammad_aliمشارکت کنندهممنون
آیا باید این کد رو تویbuild.gradle جای خاصی کپی کنم
کپی کردم ولی از : اون خط خطا می گیرهمهدی حسن زادهمدیرکلاین خط کد رو در فایل build.gradle موجود در پوشه android/app در قسمت dependencies ها اضافه کنید
-
نویسندهنوشتهها