Ich habe versucht, die react-native run-android
über mein React-Projekt auszuführen. Danach habe ich einen Fehler wie den folgenden erhalten.Stellen Sie sicher, dass Sie einen Android-Emulator ausgeführt oder ein Gerät verbunden haben und
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
Ich installierte Android SDK und setzte Android Home und Path Environmental Variable erfolgreich. Aber ich bekomme immer noch den gleichen Fehler.
Ich habe auch Gennymotion auf meinem PC zum Erstellen von virtuellen Android-Gerät installiert.
Können Sie mehr Ausgabe von dem Befehl teilen, den Sie ausgeführt haben? –
Ich habe den Beitrag mit voller Ausgabe aktualisiert. Jetzt bitte überprüfen und wiederholen. –
Haben Sie die Android-Support-Bibliothek richtig eingerichtet? https://developer.android.com/topic/libraries/support-library/setup.html. Welche Build-Tools Version und Support-Bibliothek Versionen verwenden Sie. Sie können auch den Android-Ordner des reaktiven nativen Projekts von Android Studio öffnen. Sehen Sie, ob es über Build-Tools oder eine nicht installierte Version klagt. –