آموزش جاوااسکریپت › انجمن ها › react native › اجرا نشدن react-native run-android
- این موضوع 22 پاسخ، 10 کاربر را دارد و آخرین بار در 4 سال، 4 ماه پیش بدست مهدی حسن زاده بهروزرسانی شده است.
-
نویسندهنوشتهها
-
mehdi_biniazمشارکت کننده
سلام
من مشکل دارم وقتی react-native run-android رو تو cmd میزنم
و این ارور رو میده
Starting JS server…
Building and installing the app on the device (cd android && gradlew.bat installDebug)…
Support for running Gradle using Java 7 has been deprecated and is scheduled to be removed in Gradle 5.0. Please see https://docs.gradle.org/4.4/userguide/java_plugin.html#sec:java_cross_compilation for more details.FAILURE: Build failed with an exception.
* Where:
Build file ‘E:\mehdi\react-native-project\mhdc\android\app\build.gradle’ line: 1* What went wrong:
A problem occurred evaluating project ‘:app’.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0* 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
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قبلا با انروید استدیو رو شبیه ساز میاوردم ولی واسه موارد دیگه به مشکل خوردم.
با فی*تر شکن و وی *ی ان و همه چیز امتحان کردم بازم خطا میده
اگه ممکنه راهنمایی کنید
مهدی حسن زادهمدیرکلسلام.نسخه 8 جاوا رو نصب کنید
علیرضا مختاریمیهمانStarting JS server…
Building and installing the app on the device (cd android && gradlew.bat installDebug)…FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project ‘appli’.
> Could not resolve all files for configuration ‘:classpath’.
> Could not find com.android.tools.build:gradle:3.1.4.
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.jar
Required by:
project :* 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 8s
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چطوری این ارور را حل کنم؟
mehdi_biniazمشارکت کنندهبا تشکر
بله جاوا 8 نصب کردم و مشکل بر طرف شدmohsen1473مشارکت کنندهسلام من جاوا 8 رو هم نصب کردم باز ارور میده :
Starting JS server…
Building and installing the app on the device (cd android && gradlew.bat installDebug)…FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project ‘aramesh’.
> Could not resolve all files for configuration ‘:classpath’.
> Could not resolve com.android.tools.build:gradle:3.1.4.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.1.4.
> Could not get resource ‘https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom’.
> Could not GET ‘https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom’.
> Connect to jcenter.bintray.com:443 [jcenter.bintray.com/75.126.118.188] 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. Run with –scan to get full insights.* Get more help at https://help.gradle.org
BUILD FAILED in 23s
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سلاممیهمانمشکل از تحریمه،از وب سایت shecan.ir استفاده کنید و دستور رو مجددا اجرا کنید
milad123مشارکت کنندهسلام برای من هم این ارور رو میده الته طبق سایت react-native من اومدم sdk 27 رو نصب کردم از فیلتر شکنی هم که گفتین استفاده کردم جالب اینجاست که تو اندروید استدیو دکمه run رو میزنم راحت شبیه ساز اجرا میشه مشکل چیه؟
* Where:
Build file ‘F:\react-native\AwesomeProject\android\app\build.gradle’ line: 1* What went wrong:
A problem occurred evaluating project ‘:app’.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0* 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
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مهدیمیهمانJDK رو به نسخه 1.8 بروز رسانی کنید
و JAVA_HOME رو به آدرس پوشه نسخه جدید JDK تغییر بدیدmilad123مشارکت کنندهنصب کردم ولی باز ارور میده
milad123مشارکت کنندهالان این ارور رومیده
project :app > com.facebook.react:react-native:0.57.8* 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 2m 14s
1 actionable task: 1 executed
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مهدی حسن زادهمدیرکلیک پروژه با نسخه ها ی پایین تر مثل 0.55.4 ایجاد کنید
\react-native init –version=”0.55.4″ testmilad123مشارکت کنندهدرست شد از speed v*n استفاده کردم و یه بار هم سیستم رو خاموش روشن کردم
azadgh95مشارکت کنندهمن هم همین مشکل داشتم و jdk رو تغییر دادم به ورژن 1.8.0.201
و همچنین بعدش sdk رو آپدیت کردم به بروز ترین ورژن که خداروشکر مشکلم حل شدarashمشارکت کنندهسلام
همه این کارهایی که دوستان اشاره کرده اند من انجام دادم اما هنوز مشکل برطرف نشده و از نسخه های پایین تر برای ساخت پروژه استفاده می کنم. اگه راه حل دیگه ای به نظرتون میرسه لطفا اعلام کنید.
ممنونarashمشارکت کنندهسلام
بالاخره مشکل حل شد.
ممنون از شما -
نویسندهنوشتهها