I am responding to the native version 0.42.0. My project did a great job with this.
Recently, I upgraded to version 0.43.1. and now when i do
react-native run-android
I am stuck with an error.
JS server already running. Building and installing the app on the device (cd android && ./gradlew installDebug)... Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain 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.imtqy.com/react-native/docs/android-setup.html
I followed the upgrade instructions from https://facebook.imtqy.com/react-native/docs/upgrading.html
I was looking for this problem. Went through the following links, none of them worked for me.
Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Error: could not find or load the main class org.gradle.wrapper.GradleWrapperMain
How / when to create Gradle wrapper files?
Any help / guidance would be helpful to me.
, < gradle -wrapper.jar gradle/wrapper.
gradle/wrapper
, , .
gradle -wrapper.properties *distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip, gradle .
*distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
react-native upgrade
. . , Android iOS , .
gradle-wrapper.jar ~\android\gradle\wrapper, jar 49
gradle-wrapper.properties distributionUrl = https://services.gradle.org/distributions/gradle-2.10-all.zip
(: Wrapper) {gradleVersion = '2.10'} build.gradle
, react-native run-android. :
* What went wrong: Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs for details ,
, build.gradle :
build.gradle
android { compileSdkVersion 23 buildToolsVersion "23.0.1" aaptOptions { cruncherEnabled = false useNewCruncher = false }
, :
1) Android iOS
2)
react-native eject
3) !
, react-native upgrade gradle-wrapper.jar. , (n) .
, gradle. , gradle, gradle.
, . https://gradle.org/install/#manually
Source: https://habr.com/ru/post/1016655/More articles:Toggle the "active" class between vueJS.2 children - vue.jscreate-react-app (no push) + bourbon / trim? - bourbonКак использовать FIND_IN_SET в продолжении с помощью mysql DB - node.jsAngular2 service testing: add dependency with beforeEach - unit-testingProblems with Akka.NET connection pool timeout - sql-serverrmarkdown :: render in parallel - rRespond to Android FlatList to Android Animation - javascriptError: could not find or load the main class org.gradle.wrapper.GradleWrapperMain - androidDNS query format UodeMCU UDP - luaHow to determine the Cache-Control header on an S3 object through a signed URL? - javascriptAll Articles