Reputation: 1
When i execute the command ern run-android getting following error An error occurred: Command failed: ./gradlew lib:uploadArchives
Also it doesn't generate android folder as it got created while creating application through react native
Gradle updated and exported as well
Error should be get resolved
Upvotes: 0
Views: 286
Reputation: 1
Electrode : When execute the command ern run-android getting following error An error occurred: Command failed: ./gradlew lib:uploadArchives error is got resolved.
Following are the steps to resolve the error: 1. open the terminal and type sudo su to become the root user 2. Install the gradle 3. Edit the ~/.bashrc and add the followings
export ANDROID_SDK_ROOT=/home/$USER/Android/Sdk # comment you can also change the $USER with your username or can set the path where you have installed Android
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
export PATH=$PATH:$ANDROID_SDK_ROOT/tools
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/build-tools
also optional in case still getting error add following line as well (Set gradle pat according to instllation in your system)
GRADLE_HOME=/opt/gradle
export PATH=$PATH:$GRADLE_HOME/gradle5.5
Login with root user into the terminal and execute following command once after connecting the mobile device
$ adb devices
now run the ern run-android command
Upvotes: 0