Я попытался запустить react-native run-android
для react-native run-android
моем проекте React. После этого у меня возникла ошибка, подобная следующей.
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 project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support:appcompat-v7:23.0.1.
Searched in the following locations:
file:/C:/Users/DELL/.m2/repository/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.pom
file:/C:/Users/DELL/.m2/repository/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.jar
https://jcenter.bintray.com/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.pom
https://jcenter.bintray.com/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.jar
file:/F:/Android/react/AwesomeProject/node_modules/react-native/android/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.pom
file:/F:/Android/react/AwesomeProject/node_modules/react-native/android/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.jar
Required by:
AwesomeProject:app:unspecified
AwesomeProject:app:unspecified > com.facebook.react:react-native:0.27.2
> Could not find com.android.support:recyclerview-v7:23.0.1.
Searched in the following locations:
file:/C:/Users/DELL/.m2/repository/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.pom
file:/C:/Users/DELL/.m2/repository/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.jar
https://jcenter.bintray.com/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.pom
https://jcenter.bintray.com/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.jar
file:/F:/Android/react/AwesomeProject/node_modules/react-native/android/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.pom
file:/F:/Android/react/AwesomeProject/node_modules/react-native/android/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.jar
Required by:
AwesomeProject:app:unspecified > com.facebook.react:react-native:0.27.2
> Could not find com.android.support:support-v4:23.1.1.
Searched in the following locations:
file:/C:/Users/DELL/.m2/repository/com/android/support/support-v4/23.1.1/support-v4-23.1.1.pom
file:/C:/Users/DELL/.m2/repository/com/android/support/support-v4/23.1.1/support-v4-23.1.1.jar
https://jcenter.bintray.com/com/android/support/support-v4/23.1.1/support-v4-23.1.1.pom
https://jcenter.bintray.com/com/android/support/support-v4/23.1.1/support-v4-23.1.1.jar
file:/F:/Android/react/AwesomeProject/node_modules/react-native/android/com/android/support/support-v4/23.1.1/support-v4-23.1.1.pom
file:/F:/Android/react/AwesomeProject/node_modules/react-native/android/com/android/support/support-v4/23.1.1/support-v4-23.1.1.jar
Required by:
AwesomeProject:app:unspecified > com.facebook.react:react-native:0.27.2 > com.facebook.fresco:fresco:0.10.0 > com.facebook.fresco:drawee:0.10.0
AwesomeProject:app:unspecified > com.facebook.react:react-native:0.27.2 > com.facebook.fresco:fresco:0.10.0 > com.facebook.fresco:imagepipeline:0.10.0
AwesomeProject:app:unspecified > com.facebook.react:react-native:0.27.2 > com.facebook.fresco:fresco:0.10.0 > com.facebook.fresco:imagepipeline:0.10.0 > com.facebook.fresco:imagepipeline-base:0.10.0
* 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: 17.502 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/android-setup.html
Я установил Android SDK и успешно установил Android Home и Path Environmental Variable. Но я все равно получаю ту же ошибку.
Я также установил Gennymotion на свой компьютер для создания виртуального Android-устройства.